aboutsummaryrefslogtreecommitdiff
path: root/src/client/ios
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-02-01 09:49:09 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-02-01 09:49:09 +0000
commit00407e09c734c1be508d20d392e09e3c4364a73a (patch)
tree9aa7dd0c18d86e93063bcc165c3dbcbf0f19743e /src/client/ios
parentminidump_stackwalk: Show argument registers for ARM stack traces (diff)
downloadbreakpad-00407e09c734c1be508d20d392e09e3c4364a73a.tar.xz
Add API to find out if there is crash reports to send to the server.
Review URL: https://breakpad.appspot.com/518002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1109 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/ios')
-rw-r--r--src/client/ios/BreakpadController.h3
-rw-r--r--src/client/ios/BreakpadController.mm7
2 files changed, 10 insertions, 0 deletions
diff --git a/src/client/ios/BreakpadController.h b/src/client/ios/BreakpadController.h
index f766100e..6e6229a7 100644
--- a/src/client/ios/BreakpadController.h
+++ b/src/client/ios/BreakpadController.h
@@ -105,6 +105,9 @@
// BreakpadController.
- (void)setUploadingEnabled:(BOOL)enabled;
+// Check if there is currently a crash report to upload.
+- (void)hasReportToUpload:(void(^)(BOOL))callback;
+
@end
#endif // CLIENT_IOS_HANDLER_IOS_BREAKPAD_CONTROLLER_H_
diff --git a/src/client/ios/BreakpadController.mm b/src/client/ios/BreakpadController.mm
index 01312c8f..31affa18 100644
--- a/src/client/ios/BreakpadController.mm
+++ b/src/client/ios/BreakpadController.mm
@@ -228,6 +228,13 @@ NSString* GetPlatform() {
});
}
+- (void)hasReportToUpload:(void(^)(BOOL))callback {
+ NSAssert(started_, @"The controller must be started before "
+ "hasReportToUpload is called");
+ dispatch_async(queue_, ^{
+ callback(breakpadRef_ && BreakpadHasCrashReportToUpload(breakpadRef_));
+ });
+}
#pragma mark -