OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "chrome/browser/prerender/prerender_manager_factory.h" | 59 #include "chrome/browser/prerender/prerender_manager_factory.h" |
60 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" | 60 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" |
61 #include "chrome/browser/profiles/chrome_version_service.h" | 61 #include "chrome/browser/profiles/chrome_version_service.h" |
62 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" | 62 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" |
63 #include "chrome/browser/profiles/profile_destroyer.h" | 63 #include "chrome/browser/profiles/profile_destroyer.h" |
64 #include "chrome/browser/profiles/profile_info_cache.h" | 64 #include "chrome/browser/profiles/profile_info_cache.h" |
65 #include "chrome/browser/profiles/profile_manager.h" | 65 #include "chrome/browser/profiles/profile_manager.h" |
66 #include "chrome/browser/profiles/profile_metrics.h" | 66 #include "chrome/browser/profiles/profile_metrics.h" |
67 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 67 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
68 #include "chrome/browser/search_engines/template_url_fetcher.h" | 68 #include "chrome/browser/search_engines/template_url_fetcher.h" |
| 69 #include "chrome/browser/services/gcm/gcm_permission_context.h" |
| 70 #include "chrome/browser/services/gcm/gcm_permission_context_factory.h" |
69 #include "chrome/browser/services/gcm/gcm_profile_service.h" | 71 #include "chrome/browser/services/gcm/gcm_profile_service.h" |
70 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 72 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
71 #include "chrome/browser/sessions/session_service_factory.h" | 73 #include "chrome/browser/sessions/session_service_factory.h" |
72 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 74 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
73 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 75 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
74 #include "chrome/browser/webdata/web_data_service.h" | 76 #include "chrome/browser/webdata/web_data_service.h" |
75 #include "chrome/common/chrome_constants.h" | 77 #include "chrome/common/chrome_constants.h" |
76 #include "chrome/common/chrome_paths_internal.h" | 78 #include "chrome/common/chrome_paths_internal.h" |
77 #include "chrome/common/chrome_switches.h" | 79 #include "chrome/common/chrome_switches.h" |
78 #include "chrome/common/chrome_version_info.h" | 80 #include "chrome/common/chrome_version_info.h" |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 | 1039 |
1038 quota::SpecialStoragePolicy* ProfileImpl::GetSpecialStoragePolicy() { | 1040 quota::SpecialStoragePolicy* ProfileImpl::GetSpecialStoragePolicy() { |
1039 return GetExtensionSpecialStoragePolicy(); | 1041 return GetExtensionSpecialStoragePolicy(); |
1040 } | 1042 } |
1041 | 1043 |
1042 content::PushMessagingService* ProfileImpl::GetPushMessagingService() { | 1044 content::PushMessagingService* ProfileImpl::GetPushMessagingService() { |
1043 return gcm::GCMProfileServiceFactory::GetForProfile( | 1045 return gcm::GCMProfileServiceFactory::GetForProfile( |
1044 this)->push_messaging_service(); | 1046 this)->push_messaging_service(); |
1045 } | 1047 } |
1046 | 1048 |
| 1049 gcm::GCMPermissionContext* ProfileImpl::GetPushMessagingPermissionContext() { |
| 1050 return gcm::GCMPermissionContextFactory::GetForProfile(this); |
| 1051 } |
| 1052 |
1047 bool ProfileImpl::IsSameProfile(Profile* profile) { | 1053 bool ProfileImpl::IsSameProfile(Profile* profile) { |
1048 if (profile == static_cast<Profile*>(this)) | 1054 if (profile == static_cast<Profile*>(this)) |
1049 return true; | 1055 return true; |
1050 Profile* otr_profile = off_the_record_profile_.get(); | 1056 Profile* otr_profile = off_the_record_profile_.get(); |
1051 return otr_profile && profile == otr_profile; | 1057 return otr_profile && profile == otr_profile; |
1052 } | 1058 } |
1053 | 1059 |
1054 Time ProfileImpl::GetStartTime() const { | 1060 Time ProfileImpl::GetStartTime() const { |
1055 return start_time_; | 1061 return start_time_; |
1056 } | 1062 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1328 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
1323 #if defined(OS_CHROMEOS) | 1329 #if defined(OS_CHROMEOS) |
1324 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1330 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
1325 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1331 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
1326 g_browser_process->local_state()); | 1332 g_browser_process->local_state()); |
1327 } | 1333 } |
1328 #endif // defined(OS_CHROMEOS) | 1334 #endif // defined(OS_CHROMEOS) |
1329 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1335 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
1330 GetPrefs(), g_browser_process->local_state()); | 1336 GetPrefs(), g_browser_process->local_state()); |
1331 } | 1337 } |
OLD | NEW |