| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |