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

Side by Side Diff: content/child/service_worker/service_worker_network_provider.cc

Issue 2816403002: test all
Patch Set: fix sharedworker Created 3 years, 8 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
« no previous file with comments | « content/child/runtime_features.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/child/service_worker/service_worker_network_provider.h" 5 #include "content/child/service_worker/service_worker_network_provider.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "content/child/child_thread_impl.h" 8 #include "content/child/child_thread_impl.h"
9 #include "content/child/request_extra_data.h" 9 #include "content/child/request_extra_data.h"
10 #include "content/child/service_worker/service_worker_handle_reference.h" 10 #include "content/child/service_worker/service_worker_handle_reference.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 bool IsControlledByServiceWorker() override { 79 bool IsControlledByServiceWorker() override {
80 return provider_->IsControlledByServiceWorker(); 80 return provider_->IsControlledByServiceWorker();
81 } 81 }
82 82
83 int64_t ServiceWorkerID() override { 83 int64_t ServiceWorkerID() override {
84 if (provider_->context() && provider_->context()->controller()) 84 if (provider_->context() && provider_->context()->controller())
85 return provider_->context()->controller()->version_id(); 85 return provider_->context()->controller()->version_id();
86 return kInvalidServiceWorkerVersionId; 86 return kInvalidServiceWorkerVersionId;
87 } 87 }
88 88
89 int GetID() override { return provider_->provider_id(); }
90
89 ServiceWorkerNetworkProvider* provider() { return provider_.get(); } 91 ServiceWorkerNetworkProvider* provider() { return provider_.get(); }
90 92
91 private: 93 private:
92 std::unique_ptr<ServiceWorkerNetworkProvider> provider_; 94 std::unique_ptr<ServiceWorkerNetworkProvider> provider_;
93 }; 95 };
94 96
95 } // namespace 97 } // namespace
96 98
97 // static 99 // static
98 std::unique_ptr<blink::WebServiceWorkerNetworkProvider> 100 std::unique_ptr<blink::WebServiceWorkerNetworkProvider>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return; // May be null in some tests. 214 return; // May be null in some tests.
213 dispatcher_host_->OnSetHostedVersionId(provider_id(), version_id, 215 dispatcher_host_->OnSetHostedVersionId(provider_id(), version_id,
214 embedded_worker_id); 216 embedded_worker_id);
215 } 217 }
216 218
217 bool ServiceWorkerNetworkProvider::IsControlledByServiceWorker() const { 219 bool ServiceWorkerNetworkProvider::IsControlledByServiceWorker() const {
218 return context() && context()->controller(); 220 return context() && context()->controller();
219 } 221 }
220 222
221 } // namespace content 223 } // namespace content
OLDNEW
« no previous file with comments | « content/child/runtime_features.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698