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

Side by Side Diff: content/browser/service_worker/service_worker_url_request_job.cc

Issue 2417793002: Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent. (Closed)
Patch Set: incorporated dchecng's comment Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_url_request_job.h" 5 #include "content/browser/service_worker/service_worker_url_request_job.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 initial_worker_status_ = active_worker->running_status(); 886 initial_worker_status_ = active_worker->running_status();
887 887
888 DCHECK(!fetch_dispatcher_); 888 DCHECK(!fetch_dispatcher_);
889 fetch_dispatcher_.reset(new ServiceWorkerFetchDispatcher( 889 fetch_dispatcher_.reset(new ServiceWorkerFetchDispatcher(
890 CreateFetchRequest(), active_worker, resource_type_, request()->net_log(), 890 CreateFetchRequest(), active_worker, resource_type_, request()->net_log(),
891 base::Bind(&ServiceWorkerURLRequestJob::DidPrepareFetchEvent, 891 base::Bind(&ServiceWorkerURLRequestJob::DidPrepareFetchEvent,
892 weak_factory_.GetWeakPtr(), active_worker), 892 weak_factory_.GetWeakPtr(), active_worker),
893 base::Bind(&ServiceWorkerURLRequestJob::DidDispatchFetchEvent, 893 base::Bind(&ServiceWorkerURLRequestJob::DidDispatchFetchEvent,
894 weak_factory_.GetWeakPtr()))); 894 weak_factory_.GetWeakPtr())));
895 worker_start_time_ = base::TimeTicks::Now(); 895 worker_start_time_ = base::TimeTicks::Now();
896 fetch_dispatcher_->MaybeStartNavigationPreload(request());
896 fetch_dispatcher_->Run(); 897 fetch_dispatcher_->Run();
897 } 898 }
898 899
899 } // namespace content 900 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698