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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_notification_manager.cc

Issue 2151993002: [WebAPKs] Plumb service worker scope to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into notification_scope Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/push_messaging/push_messaging_notification_manager.h" 5 #include "chrome/browser/push_messaging/push_messaging_notification_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <bitset> 9 #include <bitset>
10 10
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 const base::Closure& message_handled_closure, 344 const base::Closure& message_handled_closure,
345 bool success, 345 bool success,
346 int64_t persistent_notification_id) { 346 int64_t persistent_notification_id) {
347 DCHECK_CURRENTLY_ON(BrowserThread::UI); 347 DCHECK_CURRENTLY_ON(BrowserThread::UI);
348 if (!success) { 348 if (!success) {
349 DLOG(ERROR) << "Writing forced notification to database should not fail"; 349 DLOG(ERROR) << "Writing forced notification to database should not fail";
350 message_handled_closure.Run(); 350 message_handled_closure.Run();
351 return; 351 return;
352 } 352 }
353 353
354 // Do not pass service worker scope. The origin will be used instead of the
355 // service worker scope to determine whether a notification should be
356 // attributed to a WebAPK on Android. This is OK because this code path is hit
357 // rarely.
354 PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification( 358 PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification(
355 profile_, persistent_notification_id, origin, notification_data, 359 profile_, persistent_notification_id, GURL() /* service_worker_scope */,
356 NotificationResources()); 360 origin, notification_data, NotificationResources());
357 361
358 message_handled_closure.Run(); 362 message_handled_closure.Run();
359 } 363 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698