| 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 |
| 11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/budget_service/budget_manager.h" | 14 #include "chrome/browser/budget_service/budget_manager.h" |
| 15 #include "chrome/browser/budget_service/budget_manager_factory.h" | 15 #include "chrome/browser/budget_service/budget_manager_factory.h" |
| 16 #include "chrome/browser/engagement/site_engagement_service.h" | 16 #include "chrome/browser/engagement/site_engagement_service.h" |
| 17 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 17 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/push_messaging/push_messaging_constants.h" | 19 #include "chrome/browser/push_messaging/push_messaging_constants.h" |
| 20 #include "chrome/common/features.h" | 20 #include "chrome/common/features.h" |
| 21 #include "chrome/grit/generated_resources.h" | 21 #include "chrome/grit/generated_resources.h" |
| 22 #include "components/rappor/rappor_utils.h" | 22 #include "components/rappor/public/rappor_utils.h" |
| 23 #include "components/rappor/rappor_service_impl.h" |
| 23 #include "components/url_formatter/elide_url.h" | 24 #include "components/url_formatter/elide_url.h" |
| 24 #include "content/public/browser/browser_context.h" | 25 #include "content/public/browser/browser_context.h" |
| 25 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
| 26 #include "content/public/browser/platform_notification_context.h" | 27 #include "content/public/browser/platform_notification_context.h" |
| 27 #include "content/public/browser/push_messaging_service.h" | 28 #include "content/public/browser/push_messaging_service.h" |
| 28 #include "content/public/browser/render_frame_host.h" | 29 #include "content/public/browser/render_frame_host.h" |
| 29 #include "content/public/browser/storage_partition.h" | 30 #include "content/public/browser/storage_partition.h" |
| 30 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 31 #include "content/public/common/notification_resources.h" | 32 #include "content/public/common/notification_resources.h" |
| 32 #include "content/public/common/url_constants.h" | 33 #include "content/public/common/url_constants.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 // Do not pass service worker scope. The origin will be used instead of the | 318 // Do not pass service worker scope. The origin will be used instead of the |
| 318 // service worker scope to determine whether a notification should be | 319 // service worker scope to determine whether a notification should be |
| 319 // attributed to a WebAPK on Android. This is OK because this code path is hit | 320 // attributed to a WebAPK on Android. This is OK because this code path is hit |
| 320 // rarely. | 321 // rarely. |
| 321 PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification( | 322 PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification( |
| 322 profile_, notification_id, GURL() /* service_worker_scope */, origin, | 323 profile_, notification_id, GURL() /* service_worker_scope */, origin, |
| 323 notification_data, NotificationResources()); | 324 notification_data, NotificationResources()); |
| 324 | 325 |
| 325 message_handled_closure.Run(); | 326 message_handled_closure.Run(); |
| 326 } | 327 } |
| OLD | NEW |