Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: ios/chrome/browser/crash_report/crash_report_background_uploader.h

Issue 1138703004: [iOS] Upstream CrashReportBackgroundUploader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tools/metrics/histograms/histograms.xml Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/DEPS ('k') | ios/chrome/browser/crash_report/crash_report_background_uploader.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ios/chrome/browser/DEPS ('k') | ios/chrome/browser/crash_report/crash_report_background_uploader.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698