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

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

Issue 225403014: ServiceWorker: propagate provider_id to the browser process in .register + int32/int cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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 | Annotate | Revision Log
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/child/service_worker/web_service_worker_provider_impl.h" 5 #include "content/child/service_worker/web_service_worker_provider_impl.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/child/child_thread.h" 9 #include "content/child/child_thread.h"
10 #include "content/child/service_worker/service_worker_dispatcher.h" 10 #include "content/child/service_worker/service_worker_dispatcher.h"
(...skipping 21 matching lines...) Expand all
32 if (client) 32 if (client)
33 GetDispatcher()->AddScriptClient(provider_id_, client); 33 GetDispatcher()->AddScriptClient(provider_id_, client);
34 else 34 else
35 GetDispatcher()->RemoveScriptClient(provider_id_); 35 GetDispatcher()->RemoveScriptClient(provider_id_);
36 } 36 }
37 37
38 void WebServiceWorkerProviderImpl::registerServiceWorker( 38 void WebServiceWorkerProviderImpl::registerServiceWorker(
39 const WebURL& pattern, 39 const WebURL& pattern,
40 const WebURL& script_url, 40 const WebURL& script_url,
41 WebServiceWorkerCallbacks* callbacks) { 41 WebServiceWorkerCallbacks* callbacks) {
42 GetDispatcher()->RegisterServiceWorker(pattern, script_url, callbacks); 42 GetDispatcher()->RegisterServiceWorker(
43 provider_id_, pattern, script_url, callbacks);
43 } 44 }
44 45
45 void WebServiceWorkerProviderImpl::unregisterServiceWorker( 46 void WebServiceWorkerProviderImpl::unregisterServiceWorker(
46 const WebURL& pattern, 47 const WebURL& pattern,
47 WebServiceWorkerCallbacks* callbacks) { 48 WebServiceWorkerCallbacks* callbacks) {
48 GetDispatcher()->UnregisterServiceWorker(pattern, callbacks); 49 GetDispatcher()->UnregisterServiceWorker(
50 provider_id_, pattern, callbacks);
49 } 51 }
50 52
51 ServiceWorkerDispatcher* WebServiceWorkerProviderImpl::GetDispatcher() { 53 ServiceWorkerDispatcher* WebServiceWorkerProviderImpl::GetDispatcher() {
52 return ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_); 54 return ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_);
53 } 55 }
54 56
55 } // namespace content 57 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698