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

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

Issue 2446553002: Support Service Worker NavigationPreload with PlzNavigate. (Closed)
Patch Set: remove unnecessary comment Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_navigation_handle.h" 5 #include "content/browser/service_worker/service_worker_navigation_handle.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/service_worker/service_worker_navigation_handle_core.h " 8 #include "content/browser/service_worker/service_worker_navigation_handle_core.h "
9 #include "content/common/service_worker/service_worker_types.h" 9 #include "content/common/service_worker/service_worker_types.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 ServiceWorkerNavigationHandle::ServiceWorkerNavigationHandle( 14 ServiceWorkerNavigationHandle::ServiceWorkerNavigationHandle(
15 ServiceWorkerContextWrapper* context_wrapper) 15 ServiceWorkerContextWrapper* context_wrapper,
16 const MojoURLLoaderFactoryGetter& url_loader_factory_getter)
16 : service_worker_provider_host_id_(kInvalidServiceWorkerProviderId), 17 : service_worker_provider_host_id_(kInvalidServiceWorkerProviderId),
17 weak_factory_(this) { 18 weak_factory_(this) {
18 DCHECK_CURRENTLY_ON(BrowserThread::UI); 19 DCHECK_CURRENTLY_ON(BrowserThread::UI);
19 core_ = new ServiceWorkerNavigationHandleCore(weak_factory_.GetWeakPtr(), 20 core_ = new ServiceWorkerNavigationHandleCore(
20 context_wrapper); 21 weak_factory_.GetWeakPtr(), context_wrapper, url_loader_factory_getter);
21 } 22 }
22 23
23 ServiceWorkerNavigationHandle::~ServiceWorkerNavigationHandle() { 24 ServiceWorkerNavigationHandle::~ServiceWorkerNavigationHandle() {
24 DCHECK_CURRENTLY_ON(BrowserThread::UI); 25 DCHECK_CURRENTLY_ON(BrowserThread::UI);
25 // Delete the ServiceWorkerNavigationHandleCore on the IO thread. 26 // Delete the ServiceWorkerNavigationHandleCore on the IO thread.
26 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, core_); 27 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, core_);
27 } 28 }
28 29
29 void ServiceWorkerNavigationHandle::DidCreateServiceWorkerProviderHost( 30 void ServiceWorkerNavigationHandle::DidCreateServiceWorkerProviderHost(
30 int service_worker_provider_host_id) { 31 int service_worker_provider_host_id) {
31 DCHECK_CURRENTLY_ON(BrowserThread::UI); 32 DCHECK_CURRENTLY_ON(BrowserThread::UI);
32 service_worker_provider_host_id_ = service_worker_provider_host_id; 33 service_worker_provider_host_id_ = service_worker_provider_host_id;
33 } 34 }
34 35
35 } // namespace content 36 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698