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

Unified Diff: content/browser/service_worker/service_worker_context_core.h

Issue 1270513002: Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Chromium 2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass a raw ptr to callback's onError instead of a scoped_ptr. 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/service_worker/service_worker_context_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_context_core.h
diff --git a/content/browser/service_worker/service_worker_context_core.h b/content/browser/service_worker/service_worker_context_core.h
index ecffaca878c414174b0822effb9f8cd1e1c12c04..4748aa965ad551025e9319ad7dfaf6b9985100d0 100644
--- a/content/browser/service_worker/service_worker_context_core.h
+++ b/content/browser/service_worker/service_worker_context_core.h
@@ -58,6 +58,9 @@ class CONTENT_EXPORT ServiceWorkerContextCore
typedef base::Callback<void(ServiceWorkerStatusCode status,
const std::string& status_message,
int64 registration_id)> RegistrationCallback;
+ typedef base::Callback<void(ServiceWorkerStatusCode status,
+ const std::string& status_message,
+ int64 registration_id)> UpdateCallback;
typedef base::Callback<
void(ServiceWorkerStatusCode status)> UnregistrationCallback;
typedef IDMap<ServiceWorkerProviderHost, IDMapOwnPointer> ProviderMap;
@@ -182,6 +185,10 @@ class CONTENT_EXPORT ServiceWorkerContextCore
const UnregistrationCallback& callback);
void UpdateServiceWorker(ServiceWorkerRegistration* registration,
bool force_bypass_cache);
+ void UpdateServiceWorker(ServiceWorkerRegistration* registration,
+ bool force_bypass_cache,
+ ServiceWorkerProviderHost* provider_host,
+ const UpdateCallback& callback);
// This class maintains collections of live instances, this class
// does not own these object or influence their lifetime.
@@ -245,6 +252,11 @@ class CONTENT_EXPORT ServiceWorkerContextCore
const std::string& status_message,
ServiceWorkerRegistration* registration);
+ void UpdateComplete(const UpdateCallback& callback,
+ ServiceWorkerStatusCode status,
+ const std::string& status_message,
+ ServiceWorkerRegistration* registration);
+
void UnregistrationComplete(const GURL& pattern,
const UnregistrationCallback& callback,
int64 registration_id,
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_context_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698