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

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

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ServiceWorkerContextCore::DidFindRegistrationForCheckHasServiceWorker() Created 4 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
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_message_filter.h" 5 #include "content/browser/notifications/notification_message_filter.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "content/browser/bad_message.h" 10 #include "content/browser/bad_message.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 persistent_notification_id)); 215 persistent_notification_id));
216 } 216 }
217 217
218 void NotificationMessageFilter::DidFindServiceWorkerRegistration( 218 void NotificationMessageFilter::DidFindServiceWorkerRegistration(
219 int request_id, 219 int request_id,
220 const GURL& origin, 220 const GURL& origin,
221 const PlatformNotificationData& notification_data, 221 const PlatformNotificationData& notification_data,
222 const NotificationResources& notification_resources, 222 const NotificationResources& notification_resources,
223 int64_t persistent_notification_id, 223 int64_t persistent_notification_id,
224 content::ServiceWorkerStatusCode service_worker_status, 224 content::ServiceWorkerStatusCode service_worker_status,
225 const scoped_refptr<content::ServiceWorkerRegistration>& registration) { 225 scoped_refptr<content::ServiceWorkerRegistration> registration) {
226 DCHECK_CURRENTLY_ON(BrowserThread::IO); 226 DCHECK_CURRENTLY_ON(BrowserThread::IO);
227 227
228 if (service_worker_status != SERVICE_WORKER_OK) { 228 if (service_worker_status != SERVICE_WORKER_OK) {
229 Send(new PlatformNotificationMsg_DidShowPersistent(request_id, false)); 229 Send(new PlatformNotificationMsg_DidShowPersistent(request_id, false));
230 LOG(ERROR) << "Registration not found for " << origin.spec(); 230 LOG(ERROR) << "Registration not found for " << origin.spec();
231 // TODO(peter): Add UMA to track how often this occurs. 231 // TODO(peter): Add UMA to track how often this occurs.
232 return; 232 return;
233 } 233 }
234 234
235 PlatformNotificationService* service = 235 PlatformNotificationService* service =
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 service->CheckPermissionOnUIThread(browser_context_, origin, process_id_); 362 service->CheckPermissionOnUIThread(browser_context_, origin, process_id_);
363 363
364 if (permission_status == blink::mojom::PermissionStatus::GRANTED) 364 if (permission_status == blink::mojom::PermissionStatus::GRANTED)
365 return true; 365 return true;
366 366
367 bad_message::ReceivedBadMessage(this, bad_message::NMF_NO_PERMISSION_VERIFY); 367 bad_message::ReceivedBadMessage(this, bad_message::NMF_NO_PERMISSION_VERIFY);
368 return false; 368 return false;
369 } 369 }
370 370
371 } // namespace content 371 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/notifications/notification_message_filter.h ('k') | content/browser/push_messaging/push_messaging_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698