Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
|
Alexei Svitkine (slow)
2015/05/13 15:41:08
Nit: 2015 - fix throughout
sdefresne
2015/05/13 15:44:30
This file is upstreamed from Chrome on iOS private
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_BACKGROUND_UPLOADER_H_ | |
| 6 #define IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_BACKGROUND_UPLOADER_H_ | |
| 7 | |
| 8 #import <UIKit/UIKit.h> | |
| 9 | |
| 10 #include "base/ios/block_types.h" | |
| 11 | |
| 12 typedef void (^BackgroundFetchCompletionBlock)(UIBackgroundFetchResult); | |
| 13 | |
| 14 @interface CrashReportBackgroundUploader : NSObject | |
| 15 | |
| 16 + (instancetype)sharedInstance; | |
| 17 | |
| 18 // Handler for the application delegate |performFetchWithCompletionHandler| | |
| 19 // message. Sends the next breakpad report if available. | |
| 20 + (void)performFetchWithCompletionHandler: | |
| 21 (BackgroundFetchCompletionBlock)completionHandler; | |
| 22 | |
| 23 // Handler for the application delegate |handleEventsForBackgroundURLSession| | |
| 24 // message. Retrieves info from the URL Session. | |
| 25 + (void)handleEventsForBackgroundURLSession:(NSString*)identifier | |
| 26 completionHandler:(ProceduralBlock)completionHandler; | |
| 27 | |
| 28 // Returns YES if the session is a breakpad upload session. | |
| 29 + (BOOL)canHandleBackgroundURLSession:(NSString*)identifier; | |
| 30 | |
| 31 // Returns YES if crash reports where uploaded in the background. | |
| 32 + (BOOL)hasUploadedCrashReportsInBackground; | |
| 33 | |
| 34 // Resets the number of crash reports that have been uploaded. | |
| 35 + (void)resetReportsUploadedInBackgroundCount; | |
| 36 | |
| 37 // Flag to determine if there are any pending crash reports on startup. This is | |
| 38 // not an indication that there are pending crash reports at the moment this | |
| 39 // flag is checked. | |
| 40 @property(nonatomic, assign) BOOL hasPendingCrashReportsToUploadAtStartup; | |
| 41 | |
| 42 @end | |
| 43 | |
| 44 #endif // IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_BACKGROUND_UPLOADER_H_ | |
| OLD | NEW |