From 1fc9cc0d0e1dfafb8d29dba8d01f09587d870026 Mon Sep 17 00:00:00 2001 From: Olivier Robin Date: Thu, 18 Apr 2019 18:06:31 +0200 Subject: [Breakpad iOS] Add a callback on report upload completion. This CL adds a result callback on report upload completion. On failure, Breakpad deletes the configuration file and does retry to upload a report. Using this callback, the client will be able to log some metrics and to act on upload failure. Bug: 954175 Change-Id: I95a3264b65d4c06ba5d8dde8377440d23f1e2081 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1572661 Reviewed-by: Mark Mentovai --- src/client/ios/BreakpadController.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/client/ios/BreakpadController.h') diff --git a/src/client/ios/BreakpadController.h b/src/client/ios/BreakpadController.h index 20868473..6c70c202 100644 --- a/src/client/ios/BreakpadController.h +++ b/src/client/ios/BreakpadController.h @@ -66,6 +66,9 @@ // The dictionary that contains additional server parameters to send when // uploading crash reports. NSDictionary* uploadTimeParameters_; + + // The callback to call on report upload completion. + BreakpadUploadCompletionCallback uploadCompleteCallback_; } // Singleton. @@ -95,6 +98,10 @@ // crash report is generated. See |BreakpadAddUploadParameter|. - (void)addUploadParameter:(NSString*)value forKey:(NSString*)key; +// Sets the callback to be called after uploading a crash report to the server. +// Only the latest callback registered will be called. +- (void)setUploadCallback:(BreakpadUploadCompletionCallback)callback; + // Remove a previously-added parameter from the upload parameter set. See // |BreakpadRemoveUploadParameter|. - (void)removeUploadParameterForKey:(NSString*)key; -- cgit v1.2.1