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
This commit is contained in:
qsr@chromium.org 2013-02-01 09:49:09 +00:00
parent 52925cb9b3
commit 00407e09c7
2 changed files with 10 additions and 0 deletions

View file

@ -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_

View file

@ -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 -