mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-07-09 22:07:32 +00:00
Revert "iOS client identifies itself via URL params"
This reverts commit 262a3f50fe
.
This commit is contained in:
parent
262a3f50fe
commit
2c4c039118
|
@ -168,10 +168,6 @@ NSDictionary *readConfigurationData(const char *configFile) {
|
||||||
|
|
||||||
// Records the uploaded crash ID to the log file.
|
// Records the uploaded crash ID to the log file.
|
||||||
- (void)logUploadWithID:(const char *)uploadID;
|
- (void)logUploadWithID:(const char *)uploadID;
|
||||||
|
|
||||||
// Builds an URL parameter for a given dictionary key. Uses Uploader's parameters
|
|
||||||
// to provide its value. Returns nil if no item is stored for the given key.
|
|
||||||
- (NSURLQueryItem *)queryItemWithName:(NSString *)queryItemName forParamKey:(NSString *)key;
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation Uploader
|
@implementation Uploader
|
||||||
|
@ -535,42 +531,9 @@ NSDictionary *readConfigurationData(const char *configFile) {
|
||||||
[result release];
|
[result release];
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
- (NSURLQueryItem *)queryItemWithName:(NSString *)queryItemName forParamKey:(NSString *)key {
|
|
||||||
NSString *value = [parameters_ objectForKey:key];
|
|
||||||
NSString *escapedValue = [value stringByAddingPercentEncodingWithAllowedCharacters:
|
|
||||||
[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
||||||
return [NSURLQueryItem queryItemWithName:queryItemName value:escapedValue];
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
- (void)report {
|
- (void)report {
|
||||||
NSURL *url = [NSURL URLWithString:[parameters_ objectForKey:@BREAKPAD_URL]];
|
NSURL *url = [NSURL URLWithString:[parameters_ objectForKey:@BREAKPAD_URL]];
|
||||||
|
|
||||||
NSString *serverType = [parameters_ objectForKey:@BREAKPAD_SERVER_TYPE];
|
|
||||||
if ([serverType length] == 0 || [serverType isEqualToString:kGoogleServerType]) {
|
|
||||||
// when communicating to Crash @ Google, add URL params which identify the product
|
|
||||||
NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:url
|
|
||||||
resolvingAgainstBaseURL:false];
|
|
||||||
NSMutableArray *queryItemsToAdd = [urlComponents.queryItems mutableCopyWithZone:nil];
|
|
||||||
if (queryItemsToAdd == nil) {
|
|
||||||
queryItemsToAdd = [[NSMutableArray alloc] init];
|
|
||||||
}
|
|
||||||
|
|
||||||
NSURLQueryItem *queryItemProduct = [self queryItemWithName:@"product"
|
|
||||||
forParamKey:@BREAKPAD_PRODUCT];
|
|
||||||
NSURLQueryItem *queryItemVersion = [self queryItemWithName:@"version"
|
|
||||||
forParamKey:@BREAKPAD_VERSION];
|
|
||||||
NSURLQueryItem *queryItemGuid = [self queryItemWithName:@"guid" forParamKey:@"guid"];
|
|
||||||
|
|
||||||
if (queryItemProduct != nil) [queryItemsToAdd addObject:queryItemProduct];
|
|
||||||
if (queryItemVersion != nil) [queryItemsToAdd addObject:queryItemVersion];
|
|
||||||
if (queryItemGuid != nil) [queryItemsToAdd addObject:queryItemGuid];
|
|
||||||
|
|
||||||
urlComponents.queryItems = queryItemsToAdd;
|
|
||||||
url = [urlComponents URL];
|
|
||||||
}
|
|
||||||
|
|
||||||
HTTPMultipartUpload *upload = [[HTTPMultipartUpload alloc] initWithURL:url];
|
HTTPMultipartUpload *upload = [[HTTPMultipartUpload alloc] initWithURL:url];
|
||||||
NSMutableDictionary *uploadParameters = [NSMutableDictionary dictionary];
|
NSMutableDictionary *uploadParameters = [NSMutableDictionary dictionary];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue