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

Unified Diff: content/browser/background_sync/background_sync_manager.h

Issue 1227363002: [Background Sync] Gather UMA data for Background Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad rebase Created 5 years, 5 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 | « no previous file | content/browser/background_sync/background_sync_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/background_sync/background_sync_manager.h
diff --git a/content/browser/background_sync/background_sync_manager.h b/content/browser/background_sync/background_sync_manager.h
index e49c815894fcd003337c2519fdfa23313a6077ed..a235dac15b29489cd1e7193f3945ea288c9b1d70 100644
--- a/content/browser/background_sync/background_sync_manager.h
+++ b/content/browser/background_sync/background_sync_manager.h
@@ -48,7 +48,8 @@ class CONTENT_EXPORT BackgroundSyncManager
ERROR_TYPE_OK = 0,
ERROR_TYPE_STORAGE,
ERROR_TYPE_NOT_FOUND,
- ERROR_TYPE_NO_SERVICE_WORKER
+ ERROR_TYPE_NO_SERVICE_WORKER,
+ ERROR_TYPE_MAX = ERROR_TYPE_NO_SERVICE_WORKER
};
using StatusCallback = base::Callback<void(ErrorType)>;
@@ -207,11 +208,12 @@ class CONTENT_EXPORT BackgroundSyncManager
int64 sw_registration_id,
const RegistrationKey& registration_key,
BackgroundSyncRegistration::RegistrationId sync_registration_id,
+ SyncPeriodicity periodicity,
const StatusCallback& callback);
- void UnregisterDidStore(
- int64 sw_registration_id,
- const StatusCallback& callback,
- ServiceWorkerStatusCode status);
+ void UnregisterDidStore(int64 sw_registration_id,
+ SyncPeriodicity periodicity,
+ const StatusCallback& callback,
+ ServiceWorkerStatusCode status);
// GetRegistration callbacks
void GetRegistrationImpl(int64 sw_registration_id,
@@ -223,6 +225,7 @@ class CONTENT_EXPORT BackgroundSyncManager
SyncPeriodicity periodicity,
const StatusAndRegistrationsCallback& callback);
+ bool AreOptionConditionsMet(const BackgroundSyncRegistrationOptions& options);
bool IsRegistrationReadyToFire(
const BackgroundSyncRegistration& registration);
@@ -238,7 +241,8 @@ class CONTENT_EXPORT BackgroundSyncManager
void FireReadyEventsDidFindRegistration(
const RegistrationKey& registration_key,
BackgroundSyncRegistration::RegistrationId registration_id,
- const base::Closure& callback,
+ const base::Closure& event_fired_callback,
+ const base::Closure& event_completed_callback,
ServiceWorkerStatusCode service_worker_status,
const scoped_refptr<ServiceWorkerRegistration>&
service_worker_registration);
@@ -250,6 +254,7 @@ class CONTENT_EXPORT BackgroundSyncManager
int64 service_worker_id,
const RegistrationKey& key,
BackgroundSyncRegistration::RegistrationId sync_registration_id,
+ const base::Closure& callback,
ServiceWorkerStatusCode status_code);
void EventCompleteImpl(
int64 service_worker_id,
@@ -261,6 +266,9 @@ class CONTENT_EXPORT BackgroundSyncManager
const base::Closure& callback,
ServiceWorkerStatusCode status_code);
+ // Called when all sync events have completed.
+ static void OnAllSyncEventsCompleted(const base::TimeTicks& start_time);
+
// OnRegistrationDeleted callbacks
void OnRegistrationDeletedImpl(int64 registration_id,
const base::Closure& callback);
@@ -276,6 +284,7 @@ class CONTENT_EXPORT BackgroundSyncManager
void CompleteOperationCallback(const CallbackT& callback,
Params... parameters);
base::Closure MakeEmptyCompletion();
+ base::Closure MakeClosureCompletion(const base::Closure& callback);
StatusAndRegistrationCallback MakeStatusAndRegistrationCompletion(
const StatusAndRegistrationCallback& callback);
StatusAndRegistrationsCallback MakeStatusAndRegistrationsCompletion(
« no previous file with comments | « no previous file | content/browser/background_sync/background_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698