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

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

Issue 440403002: Don't share ServiceWorkerHandle between provider hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/service_worker/service_worker_handle_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_provider_host.h" 5 #include "content/browser/service_worker/service_worker_provider_host.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/browser/message_port_message_filter.h" 8 #include "content/browser/message_port_message_filter.h"
9 #include "content/browser/service_worker/service_worker_context_core.h" 9 #include "content/browser/service_worker/service_worker_context_core.h"
10 #include "content/browser/service_worker/service_worker_context_request_handler. h" 10 #include "content/browser/service_worker/service_worker_context_request_handler. h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 message, 218 message,
219 sent_message_port_ids, 219 sent_message_port_ids,
220 new_routing_ids)); 220 new_routing_ids));
221 } 221 }
222 222
223 ServiceWorkerObjectInfo ServiceWorkerProviderHost::CreateHandleAndPass( 223 ServiceWorkerObjectInfo ServiceWorkerProviderHost::CreateHandleAndPass(
224 ServiceWorkerVersion* version) { 224 ServiceWorkerVersion* version) {
225 ServiceWorkerObjectInfo info; 225 ServiceWorkerObjectInfo info;
226 if (context_ && version) { 226 if (context_ && version) {
227 scoped_ptr<ServiceWorkerHandle> handle = 227 scoped_ptr<ServiceWorkerHandle> handle =
228 ServiceWorkerHandle::Create(context_, dispatcher_host_, 228 ServiceWorkerHandle::Create(context_,
229 kDocumentMainThreadId, version); 229 dispatcher_host_,
230 kDocumentMainThreadId,
231 provider_id_,
232 version);
230 info = handle->GetObjectInfo(); 233 info = handle->GetObjectInfo();
231 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass()); 234 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass());
232 } 235 }
233 return info; 236 return info;
234 } 237 }
235 238
236 bool ServiceWorkerProviderHost::IsContextAlive() { 239 bool ServiceWorkerProviderHost::IsContextAlive() {
237 return context_ != NULL; 240 return context_ != NULL;
238 } 241 }
239 242
240 } // namespace content 243 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_handle_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698