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

Side by Side Diff: content/browser/notifications/notification_event_dispatcher_impl.cc

Issue 1079923002: ServiceWorker: Stop exposing ServiceWorkerContextCore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/browser/notifications/notification_event_dispatcher_impl.h" 5 #include "content/browser/notifications/notification_event_dispatcher_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "content/browser/service_worker/service_worker_context_wrapper.h" 8 #include "content/browser/service_worker/service_worker_context_wrapper.h"
9 #include "content/browser/service_worker/service_worker_registration.h" 9 #include "content/browser/service_worker/service_worker_registration.h"
10 #include "content/browser/service_worker/service_worker_storage.h" 10 #include "content/browser/service_worker/service_worker_storage.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Finds the ServiceWorkerRegistration associated with the |origin| and 114 // Finds the ServiceWorkerRegistration associated with the |origin| and
115 // |service_worker_registration_id|. Must be called on the IO thread. 115 // |service_worker_registration_id|. Must be called on the IO thread.
116 void FindServiceWorkerRegistration( 116 void FindServiceWorkerRegistration(
117 const GURL& origin, 117 const GURL& origin,
118 int64 service_worker_registration_id, 118 int64 service_worker_registration_id,
119 const std::string& notification_id, 119 const std::string& notification_id,
120 const PlatformNotificationData& notification_data, 120 const PlatformNotificationData& notification_data,
121 const NotificationClickDispatchCompleteCallback& dispatch_complete_callback, 121 const NotificationClickDispatchCompleteCallback& dispatch_complete_callback,
122 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context) { 122 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context) {
123 DCHECK_CURRENTLY_ON(BrowserThread::IO); 123 DCHECK_CURRENTLY_ON(BrowserThread::IO);
124 service_worker_context->context()->storage()->FindRegistrationForId( 124 service_worker_context->FindRegistrationForId(
125 service_worker_registration_id, 125 service_worker_registration_id,
126 origin, 126 origin,
127 base::Bind(&DispatchNotificationClickEventOnRegistration, 127 base::Bind(&DispatchNotificationClickEventOnRegistration,
128 notification_id, 128 notification_id,
129 notification_data, 129 notification_data,
130 dispatch_complete_callback)); 130 dispatch_complete_callback));
131 } 131 }
132 132
133 } // namespace 133 } // namespace
134 134
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 base::Bind(&FindServiceWorkerRegistration, 168 base::Bind(&FindServiceWorkerRegistration,
169 origin, 169 origin,
170 service_worker_registration_id, 170 service_worker_registration_id,
171 notification_id, 171 notification_id,
172 notification_data, 172 notification_data,
173 dispatch_complete_callback, 173 dispatch_complete_callback,
174 service_worker_context)); 174 service_worker_context));
175 } 175 }
176 176
177 } // namespace content 177 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698