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.h" | |
Jeffrey Yasskin
2016/01/21 00:32:30
I think you don't need this #include.
juncai
2016/01/25 18:53:32
Without this include, line:
return ChooserPermissi
Reilly Grant (use Gerrit)
2016/01/25 19:08:38
ChooserPermissionManagerFactory::GetForProfile sho
juncai
2016/01/25 21:51:59
Done.
| |
51 #include "chrome/browser/permissions/chooser_permission_manager_factory.h" | |
50 #include "chrome/browser/permissions/permission_manager.h" | 52 #include "chrome/browser/permissions/permission_manager.h" |
51 #include "chrome/browser/permissions/permission_manager_factory.h" | 53 #include "chrome/browser/permissions/permission_manager_factory.h" |
52 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 54 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
53 #include "chrome/browser/plugins/plugin_prefs.h" | 55 #include "chrome/browser/plugins/plugin_prefs.h" |
54 #include "chrome/browser/policy/profile_policy_connector.h" | 56 #include "chrome/browser/policy/profile_policy_connector.h" |
55 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 57 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
56 #include "chrome/browser/prefs/browser_prefs.h" | 58 #include "chrome/browser/prefs/browser_prefs.h" |
57 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 59 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
58 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 60 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
59 #include "chrome/browser/prerender/prerender_manager_factory.h" | 61 #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 | 1022 // TODO(mlamouri): we should all these BrowserContext implementation to Profile |
1021 // instead of repeating them inside all Profile implementations. | 1023 // instead of repeating them inside all Profile implementations. |
1022 content::PermissionManager* ProfileImpl::GetPermissionManager() { | 1024 content::PermissionManager* ProfileImpl::GetPermissionManager() { |
1023 return PermissionManagerFactory::GetForProfile(this); | 1025 return PermissionManagerFactory::GetForProfile(this); |
1024 } | 1026 } |
1025 | 1027 |
1026 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { | 1028 content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { |
1027 return BackgroundSyncControllerFactory::GetForProfile(this); | 1029 return BackgroundSyncControllerFactory::GetForProfile(this); |
1028 } | 1030 } |
1029 | 1031 |
1032 content::ChooserPermissionManager* ProfileImpl::GetChooserPermissionManager() { | |
1033 return ChooserPermissionManagerFactory::GetForProfile(this); | |
1034 } | |
1035 | |
1030 bool ProfileImpl::IsSameProfile(Profile* profile) { | 1036 bool ProfileImpl::IsSameProfile(Profile* profile) { |
1031 if (profile == static_cast<Profile*>(this)) | 1037 if (profile == static_cast<Profile*>(this)) |
1032 return true; | 1038 return true; |
1033 Profile* otr_profile = off_the_record_profile_.get(); | 1039 Profile* otr_profile = off_the_record_profile_.get(); |
1034 return otr_profile && profile == otr_profile; | 1040 return otr_profile && profile == otr_profile; |
1035 } | 1041 } |
1036 | 1042 |
1037 Time ProfileImpl::GetStartTime() const { | 1043 Time ProfileImpl::GetStartTime() const { |
1038 return start_time_; | 1044 return start_time_; |
1039 } | 1045 } |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1277 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1283 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1278 domain_reliability::DomainReliabilityService* service = | 1284 domain_reliability::DomainReliabilityService* service = |
1279 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1285 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1280 GetForBrowserContext(this); | 1286 GetForBrowserContext(this); |
1281 if (!service) | 1287 if (!service) |
1282 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1288 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1283 | 1289 |
1284 return service->CreateMonitor( | 1290 return service->CreateMonitor( |
1285 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1291 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1286 } | 1292 } |
OLD | NEW |