| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |