aboutsummaryrefslogtreecommitdiff
path: root/src/client/ios/BreakpadController.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ios/BreakpadController.mm')
-rw-r--r--src/client/ios/BreakpadController.mm23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/client/ios/BreakpadController.mm b/src/client/ios/BreakpadController.mm
index 8d499c27..01fb5f13 100644
--- a/src/client/ios/BreakpadController.mm
+++ b/src/client/ios/BreakpadController.mm
@@ -166,9 +166,9 @@ NSString* GetPlatform() {
NSAssert(started_, @"The controller must be started before "
"threadUnsafeSendReportWithConfiguration is called");
if (breakpadRef_) {
- BreakpadUploadReportWithParametersAndConfiguration(breakpadRef_,
- uploadTimeParameters_,
- configuration);
+ BreakpadUploadReportWithParametersAndConfiguration(
+ breakpadRef_, uploadTimeParameters_, configuration,
+ uploadCompleteCallback_);
}
}
@@ -195,7 +195,7 @@ NSString* GetPlatform() {
NSAssert(!started_,
@"The controller must not be started when updateConfiguration is called");
[configuration_ addEntriesFromDictionary:configuration];
- NSString* uploadInterval =
+ NSString *uploadInterval =
[configuration_ valueForKey:@BREAKPAD_REPORT_INTERVAL];
if (uploadInterval)
[self setUploadInterval:[uploadInterval intValue]];
@@ -206,7 +206,7 @@ NSString* GetPlatform() {
@"The controller must not be started when resetConfiguration is called");
[configuration_ autorelease];
configuration_ = [[[NSBundle mainBundle] infoDictionary] mutableCopy];
- NSString* uploadInterval =
+ NSString *uploadInterval =
[configuration_ valueForKey:@BREAKPAD_REPORT_INTERVAL];
[self setUploadInterval:[uploadInterval intValue]];
[self setParametersToAddAtUploadTime:nil];
@@ -243,6 +243,15 @@ NSString* GetPlatform() {
});
}
+- (void)setUploadCallback:(BreakpadUploadCompletionCallback)callback {
+ NSAssert(started_,
+ @"The controller must not be started before setUploadCallback is "
+ "called");
+ dispatch_async(queue_, ^{
+ uploadCompleteCallback_ = callback;
+ });
+}
+
- (void)removeUploadParameterForKey:(NSString*)key {
NSAssert(started_, @"The controller must be started before "
"removeUploadParameterForKey is called");
@@ -345,8 +354,8 @@ NSString* GetPlatform() {
// A report can be sent now.
if (timeToWait == 0) {
[self reportWillBeSent];
- BreakpadUploadNextReportWithParameters(breakpadRef_,
- uploadTimeParameters_);
+ BreakpadUploadNextReportWithParameters(breakpadRef_, uploadTimeParameters_,
+ uploadCompleteCallback_);
// If more reports must be sent, make sure this method is called again.
if (BreakpadGetCrashReportCount(breakpadRef_) > 0)