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/push_messaging/push_messaging_service_impl.h" | 5 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/barrier_closure.h" | 9 #include "base/barrier_closure.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/metrics/field_trial.h" | 14 #include "base/metrics/field_trial.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 18 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
19 #include "chrome/browser/permissions/permission_manager.h" | 19 #include "chrome/browser/permissions/permission_manager.h" |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/push_messaging/push_messaging_app_identifier.h" | 21 #include "chrome/browser/push_messaging/push_messaging_app_identifier.h" |
22 #include "chrome/browser/push_messaging/push_messaging_constants.h" | 22 #include "chrome/browser/push_messaging/push_messaging_constants.h" |
23 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" | 23 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" |
24 #include "chrome/browser/services/gcm/gcm_profile_service.h" | |
25 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 24 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
26 #include "chrome/browser/ui/chrome_pages.h" | 25 #include "chrome/browser/ui/chrome_pages.h" |
27 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
28 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
29 #include "chrome/grit/generated_resources.h" | 28 #include "chrome/grit/generated_resources.h" |
30 #include "components/content_settings/core/browser/host_content_settings_map.h" | 29 #include "components/content_settings/core/browser/host_content_settings_map.h" |
31 #include "components/gcm_driver/gcm_driver.h" | 30 #include "components/gcm_driver/gcm_driver.h" |
| 31 #include "components/gcm_driver/gcm_profile_service.h" |
32 #include "components/pref_registry/pref_registry_syncable.h" | 32 #include "components/pref_registry/pref_registry_syncable.h" |
33 #include "components/rappor/rappor_utils.h" | 33 #include "components/rappor/rappor_utils.h" |
34 #include "content/public/browser/browser_context.h" | 34 #include "content/public/browser/browser_context.h" |
35 #include "content/public/browser/permission_type.h" | 35 #include "content/public/browser/permission_type.h" |
36 #include "content/public/browser/render_frame_host.h" | 36 #include "content/public/browser/render_frame_host.h" |
37 #include "content/public/browser/service_worker_context.h" | 37 #include "content/public/browser/service_worker_context.h" |
38 #include "content/public/browser/storage_partition.h" | 38 #include "content/public/browser/storage_partition.h" |
39 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
40 #include "content/public/common/child_process_host.h" | 40 #include "content/public/common/child_process_host.h" |
41 #include "content/public/common/content_switches.h" | 41 #include "content/public/common/content_switches.h" |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 switches::kEnablePushMessagePayload); | 764 switches::kEnablePushMessagePayload); |
765 } | 765 } |
766 | 766 |
767 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const { | 767 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const { |
768 gcm::GCMProfileService* gcm_profile_service = | 768 gcm::GCMProfileService* gcm_profile_service = |
769 gcm::GCMProfileServiceFactory::GetForProfile(profile_); | 769 gcm::GCMProfileServiceFactory::GetForProfile(profile_); |
770 CHECK(gcm_profile_service); | 770 CHECK(gcm_profile_service); |
771 CHECK(gcm_profile_service->driver()); | 771 CHECK(gcm_profile_service->driver()); |
772 return gcm_profile_service->driver(); | 772 return gcm_profile_service->driver(); |
773 } | 773 } |
OLD | NEW |