aboutsummaryrefslogtreecommitdiff
path: root/src/client/ios/BreakpadController.mm
diff options
context:
space:
mode:
authorblundell@chromium.org <blundell@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-01-13 10:40:07 +0000
committerblundell@chromium.org <blundell@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-01-13 10:40:07 +0000
commit12528d19bdf7b00a0f1ad5cd466a12d587189055 (patch)
tree81b1a95d192cf1873676b41c653213f288f3e307 /src/client/ios/BreakpadController.mm
parentDon't do work inside assert(). Ever. (diff)
downloadbreakpad-12528d19bdf7b00a0f1ad5cd466a12d587189055.tar.xz
Add -[BreakpadController setParametersToAddAtUploadTime:] for iOS.
This provides the ability to add server parameters to a crash report when the report is uploaded. Patch by KiYun Roe <kiyun@chromium.org> BUG=558 R=blundell@chromium.org Review URL: https://breakpad.appspot.com/974002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1271 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/ios/BreakpadController.mm')
-rw-r--r--src/client/ios/BreakpadController.mm11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/ios/BreakpadController.mm b/src/client/ios/BreakpadController.mm
index 9a6dd814..4571470d 100644
--- a/src/client/ios/BreakpadController.mm
+++ b/src/client/ios/BreakpadController.mm
@@ -120,6 +120,7 @@ NSString* GetPlatform() {
assert(!breakpadRef_);
dispatch_release(queue_);
[configuration_ release];
+ [uploadTimeParameters_ release];
[super dealloc];
}
@@ -192,6 +193,7 @@ NSString* GetPlatform() {
NSString* uploadInterval =
[configuration_ valueForKey:@BREAKPAD_REPORT_INTERVAL];
[self setUploadInterval:[uploadInterval intValue]];
+ [self setParametersToAddAtUploadTime:nil];
}
- (void)setUploadingURL:(NSString*)url {
@@ -209,6 +211,13 @@ NSString* GetPlatform() {
uploadIntervalInSeconds_ = 0;
}
+- (void)setParametersToAddAtUploadTime:(NSDictionary*)uploadTimeParameters {
+ NSAssert(!started_, @"The controller must not be started when "
+ "setParametersToAddAtUploadTime is called");
+ [uploadTimeParameters_ autorelease];
+ uploadTimeParameters_ = [uploadTimeParameters copy];
+}
+
- (void)addUploadParameter:(NSString*)value forKey:(NSString*)key {
NSAssert(started_,
@"The controller must be started before addUploadParameter is called");
@@ -291,7 +300,7 @@ NSString* GetPlatform() {
// A report can be sent now.
if (timeToWait == 0) {
[self reportWillBeSent];
- BreakpadUploadNextReport(breakpadRef_);
+ BreakpadUploadNextReport(breakpadRef_, uploadTimeParameters_);
// If more reports must be sent, make sure this method is called again.
if (BreakpadGetCrashReportCount(breakpadRef_) > 0)