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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 40 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
41 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 41 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
42 #include "chrome/browser/dom_distiller/profile_utils.h" | 42 #include "chrome/browser/dom_distiller/profile_utils.h" |
43 #include "chrome/browser/domain_reliability/service_factory.h" | 43 #include "chrome/browser/domain_reliability/service_factory.h" |
44 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 44 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
45 #include "chrome/browser/download/download_service.h" | 45 #include "chrome/browser/download/download_service.h" |
46 #include "chrome/browser/download/download_service_factory.h" | 46 #include "chrome/browser/download/download_service_factory.h" |
47 #include "chrome/browser/net/net_pref_observer.h" | 47 #include "chrome/browser/net/net_pref_observer.h" |
48 #include "chrome/browser/net/predictor.h" | 48 #include "chrome/browser/net/predictor.h" |
49 #include "chrome/browser/net/proxy_service_factory.h" | 49 #include "chrome/browser/net/proxy_service_factory.h" |
| 50 #include "chrome/browser/permissions/chooser_permission_manager_factory.h" |
50 #include "chrome/browser/permissions/permission_manager.h" | 51 #include "chrome/browser/permissions/permission_manager.h" |
51 #include "chrome/browser/permissions/permission_manager_factory.h" | 52 #include "chrome/browser/permissions/permission_manager_factory.h" |
52 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 53 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
53 #include "chrome/browser/plugins/plugin_prefs.h" | 54 #include "chrome/browser/plugins/plugin_prefs.h" |
54 #include "chrome/browser/policy/profile_policy_connector.h" | 55 #include "chrome/browser/policy/profile_policy_connector.h" |
55 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 56 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
56 #include "chrome/browser/prefs/browser_prefs.h" | 57 #include "chrome/browser/prefs/browser_prefs.h" |
57 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 58 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
58 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 59 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
59 #include "chrome/browser/prerender/prerender_manager_factory.h" | 60 #include "chrome/browser/prerender/prerender_manager_factory.h" |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 // TODO(mlamouri): we should all these BrowserContext implementation to Profile | 1021 // TODO(mlamouri): we should all these BrowserContext implementation to Profile |
1021 // instead of repeating them inside all Profile implementations. | 1022 // instead of repeating them inside all Profile implementations. |
1022 content::PermissionManager* ProfileImpl::GetPermissionManager() { | 1023 content::PermissionManager* ProfileImpl::GetPermissionManager() { |
1023 return PermissionManagerFactory::GetForProfile(this); | 1024 return PermissionManagerFactory::GetForProfile(this); |
1024 } | 1025 } |
1025 | 1026 |
1026 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { | 1027 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { |
1027 return BackgroundSyncControllerFactory::GetForProfile(this); | 1028 return BackgroundSyncControllerFactory::GetForProfile(this); |
1028 } | 1029 } |
1029 | 1030 |
| 1031 content::ChooserPermissionManager* ProfileImpl::GetChooserPermissionManager() { |
| 1032 return ChooserPermissionManagerFactory::GetForProfile(this); |
| 1033 } |
| 1034 |
1030 bool ProfileImpl::IsSameProfile(Profile* profile) { | 1035 bool ProfileImpl::IsSameProfile(Profile* profile) { |
1031 if (profile == static_cast<Profile*>(this)) | 1036 if (profile == static_cast<Profile*>(this)) |
1032 return true; | 1037 return true; |
1033 Profile* otr_profile = off_the_record_profile_.get(); | 1038 Profile* otr_profile = off_the_record_profile_.get(); |
1034 return otr_profile && profile == otr_profile; | 1039 return otr_profile && profile == otr_profile; |
1035 } | 1040 } |
1036 | 1041 |
1037 Time ProfileImpl::GetStartTime() const { | 1042 Time ProfileImpl::GetStartTime() const { |
1038 return start_time_; | 1043 return start_time_; |
1039 } | 1044 } |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1282 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1278 domain_reliability::DomainReliabilityService* service = | 1283 domain_reliability::DomainReliabilityService* service = |
1279 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1284 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1280 GetForBrowserContext(this); | 1285 GetForBrowserContext(this); |
1281 if (!service) | 1286 if (!service) |
1282 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1287 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1283 | 1288 |
1284 return service->CreateMonitor( | 1289 return service->CreateMonitor( |
1285 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1290 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1286 } | 1291 } |
OLD | NEW |