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

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

Issue 493373002: ServiceWorker: Add prepare_callback in DispatchFetchEvent to notify the end of SW preparation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate the reviewers comment Created 6 years, 4 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
Index: content/browser/service_worker/service_worker_fetch_dispatcher.h
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.h b/content/browser/service_worker/service_worker_fetch_dispatcher.h
index 7b905e0b35d7fe5cc78d473f70b9dbad4d5d4cdd..f20fb9495487bb3d38723c953c9811c9fe21c6e5 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.h
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.h
@@ -24,7 +24,8 @@ class ServiceWorkerFetchDispatcher {
ServiceWorkerFetchDispatcher(scoped_ptr<ServiceWorkerFetchRequest> request,
ServiceWorkerVersion* version,
- const FetchCallback& callback);
+ const base::Closure& prepare_callback,
+ const FetchCallback& fetch_callback);
~ServiceWorkerFetchDispatcher();
// Dispatches a fetch event to the |version| given in ctor, and fires
@@ -35,12 +36,14 @@ class ServiceWorkerFetchDispatcher {
void DidWaitActivation();
void DidFailActivation();
void DispatchFetchEvent();
+ void DidPrepare();
void DidFinish(ServiceWorkerStatusCode status,
ServiceWorkerFetchEventResult fetch_result,
const ServiceWorkerResponse& response);
scoped_refptr<ServiceWorkerVersion> version_;
- FetchCallback callback_;
+ base::Closure prepare_callback_;
+ FetchCallback fetch_callback_;
scoped_ptr<ServiceWorkerFetchRequest> request_;
base::WeakPtrFactory<ServiceWorkerFetchDispatcher> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698