mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-19 03:42:57 +00:00
Add support for product_name in Mac sym_upload v2
Change-Id: I6fab9f62434fd19eb7aea4a66f0dd809af57e595 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3436859 Reviewed-by: Nelson Billing <nbilling@google.com> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
committed by
Nelson Billing
parent
3123f102ff
commit
7685201906
@@ -96,7 +96,8 @@ typedef NS_ENUM(NSInteger, SymbolStatus) {
|
||||
withUploadKey:(NSString*)uploadKey
|
||||
withDebugFile:(NSString*)debugFile
|
||||
withDebugID:(NSString*)debugID
|
||||
withType:(NSString*)type;
|
||||
withType:(NSString*)type
|
||||
withProductName:(NSString*)productName;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -190,18 +190,22 @@
|
||||
withUploadKey:(NSString*)uploadKey
|
||||
withDebugFile:(NSString*)debugFile
|
||||
withDebugID:(NSString*)debugID
|
||||
withType:(NSString*)type {
|
||||
withType:(NSString*)type
|
||||
withProductName:(NSString*)productName {
|
||||
NSURL* URL = [NSURL
|
||||
URLWithString:[NSString
|
||||
stringWithFormat:@"%@/v1/uploads/%@:complete?key=%@",
|
||||
APIURL, uploadKey, APIKey]];
|
||||
|
||||
NSDictionary* symbolIdDictionary =
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:debugFile, @"debug_file",
|
||||
debugID, @"debug_id", nil];
|
||||
NSDictionary* jsonDictionary = [NSDictionary
|
||||
dictionaryWithObjectsAndKeys:symbolIdDictionary, @"symbol_id", type,
|
||||
@"symbol_upload_type", nil];
|
||||
NSMutableDictionary* jsonDictionary = [@{
|
||||
@"symbol_id" : @{@"debug_file" : debugFile, @"debug_id" : debugID},
|
||||
@"symbol_upload_type" : type
|
||||
} mutableCopy];
|
||||
|
||||
if (productName != nil) {
|
||||
jsonDictionary[@"metadata"] = @{@"product_name": productName};
|
||||
}
|
||||
|
||||
NSError* error = nil;
|
||||
NSData* jsonData =
|
||||
[NSJSONSerialization dataWithJSONObject:jsonDictionary
|
||||
|
||||
Reference in New Issue
Block a user