Chromium Code Reviews| Index: ios/chrome/browser/crash_report/crash_report_background_uploader.h |
| diff --git a/ios/chrome/browser/crash_report/crash_report_background_uploader.h b/ios/chrome/browser/crash_report/crash_report_background_uploader.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3469293ed46f63ba04066c3ef652460da3ea0489 |
| --- /dev/null |
| +++ b/ios/chrome/browser/crash_report/crash_report_background_uploader.h |
| @@ -0,0 +1,44 @@ |
| +// 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
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_BACKGROUND_UPLOADER_H_ |
| +#define IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_BACKGROUND_UPLOADER_H_ |
| + |
| +#import <UIKit/UIKit.h> |
| + |
| +#include "base/ios/block_types.h" |
| + |
| +typedef void (^BackgroundFetchCompletionBlock)(UIBackgroundFetchResult); |
| + |
| +@interface CrashReportBackgroundUploader : NSObject |
| + |
| ++ (instancetype)sharedInstance; |
| + |
| +// Handler for the application delegate |performFetchWithCompletionHandler| |
| +// message. Sends the next breakpad report if available. |
| ++ (void)performFetchWithCompletionHandler: |
| + (BackgroundFetchCompletionBlock)completionHandler; |
| + |
| +// Handler for the application delegate |handleEventsForBackgroundURLSession| |
| +// message. Retrieves info from the URL Session. |
| ++ (void)handleEventsForBackgroundURLSession:(NSString*)identifier |
| + completionHandler:(ProceduralBlock)completionHandler; |
| + |
| +// Returns YES if the session is a breakpad upload session. |
| ++ (BOOL)canHandleBackgroundURLSession:(NSString*)identifier; |
| + |
| +// Returns YES if crash reports where uploaded in the background. |
| ++ (BOOL)hasUploadedCrashReportsInBackground; |
| + |
| +// Resets the number of crash reports that have been uploaded. |
| ++ (void)resetReportsUploadedInBackgroundCount; |
| + |
| +// Flag to determine if there are any pending crash reports on startup. This is |
| +// not an indication that there are pending crash reports at the moment this |
| +// flag is checked. |
| +@property(nonatomic, assign) BOOL hasPendingCrashReportsToUploadAtStartup; |
| + |
| +@end |
| + |
| +#endif // IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_BACKGROUND_UPLOADER_H_ |