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

Unified Diff: content/browser/service_worker/service_worker_url_request_job.cc

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: 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_url_request_job.cc
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc
index 6a795d630de276a655d8a46490ff576385bed64f..cc10f3ee4cb4cdde65a7663551858b7c8088a78d 100644
--- a/content/browser/service_worker/service_worker_url_request_job.cc
+++ b/content/browser/service_worker/service_worker_url_request_job.cc
@@ -229,6 +229,8 @@ void ServiceWorkerURLRequestJob::StartRequest() {
fetch_dispatcher_.reset(new ServiceWorkerFetchDispatcher(
CreateFetchRequest(),
provider_host_->active_version(),
+ base::Bind(&ServiceWorkerURLRequestJob::DidPrepareFetchEvent,
+ weak_factory_.GetWeakPtr()),
base::Bind(&ServiceWorkerURLRequestJob::DidDispatchFetchEvent,
weak_factory_.GetWeakPtr())));
fetch_dispatcher_->Run();
@@ -322,6 +324,9 @@ bool ServiceWorkerURLRequestJob::CreateRequestBodyBlob(std::string* blob_uuid,
return true;
}
+void ServiceWorkerURLRequestJob::DidPrepareFetchEvent() {
nhiroki 2014/08/22 04:50:58 Can you add a comment here? For example, if you w
horo 2014/08/22 05:11:51 Please write TODO comments.
shimazu 2014/08/25 02:17:40 Done.
shimazu 2014/08/25 02:17:40 Done.
+}
+
void ServiceWorkerURLRequestJob::DidDispatchFetchEvent(
ServiceWorkerStatusCode status,
ServiceWorkerFetchEventResult fetch_result,

Powered by Google App Engine
This is Rietveld 408576698