OLD | NEW |
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 "chrome/browser/notifications/platform_notification_service_impl.h" | 5 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
11 #include "base/metrics/user_metrics.h" | 11 #include "base/metrics/user_metrics.h" |
12 #include "base/metrics/user_metrics_action.h" | 12 #include "base/metrics/user_metrics_action.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
18 #include "chrome/browser/engagement/site_engagement_service.h" | 18 #include "chrome/browser/engagement/site_engagement_service.h" |
19 #include "chrome/browser/notifications/native_notification_delegate.h" | |
20 #include "chrome/browser/notifications/notification_common.h" | 19 #include "chrome/browser/notifications/notification_common.h" |
21 #include "chrome/browser/notifications/notification_display_service_factory.h" | 20 #include "chrome/browser/notifications/notification_display_service_factory.h" |
22 #include "chrome/browser/notifications/web_notification_delegate.h" | 21 #include "chrome/browser/notifications/web_notification_delegate.h" |
23 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" | 22 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" |
24 #include "chrome/browser/permissions/permission_manager.h" | 23 #include "chrome/browser/permissions/permission_manager.h" |
25 #include "chrome/browser/permissions/permission_result.h" | 24 #include "chrome/browser/permissions/permission_result.h" |
26 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/profiles/profile_attributes_storage.h" | 26 #include "chrome/browser/profiles/profile_attributes_storage.h" |
28 #include "chrome/browser/profiles/profile_io_data.h" | 27 #include "chrome/browser/profiles/profile_io_data.h" |
29 #include "chrome/browser/profiles/profile_manager.h" | 28 #include "chrome/browser/profiles/profile_manager.h" |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 546 |
548 void PlatformNotificationServiceImpl::RecordSiteEngagement( | 547 void PlatformNotificationServiceImpl::RecordSiteEngagement( |
549 BrowserContext* browser_context, | 548 BrowserContext* browser_context, |
550 const GURL& origin) { | 549 const GURL& origin) { |
551 // TODO(dominickn, peter): This would be better if the site engagement service | 550 // TODO(dominickn, peter): This would be better if the site engagement service |
552 // could directly observe each notification. | 551 // could directly observe each notification. |
553 SiteEngagementService* engagement_service = | 552 SiteEngagementService* engagement_service = |
554 SiteEngagementService::Get(Profile::FromBrowserContext(browser_context)); | 553 SiteEngagementService::Get(Profile::FromBrowserContext(browser_context)); |
555 engagement_service->HandleNotificationInteraction(origin); | 554 engagement_service->HandleNotificationInteraction(origin); |
556 } | 555 } |
OLD | NEW |