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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 namespace content { | 41 namespace content { |
42 class SpeechRecognitionPreferences; | 42 class SpeechRecognitionPreferences; |
43 } | 43 } |
44 | 44 |
45 namespace extensions { | 45 namespace extensions { |
46 class ExtensionSystem; | 46 class ExtensionSystem; |
47 } | 47 } |
48 | 48 |
| 49 namespace policy { |
| 50 class UserCloudPolicyManager; |
| 51 } |
| 52 |
49 // The default profile implementation. | 53 // The default profile implementation. |
50 class ProfileImpl : public Profile, | 54 class ProfileImpl : public Profile, |
51 public content::NotificationObserver { | 55 public content::NotificationObserver { |
52 public: | 56 public: |
53 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. | 57 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. |
54 static const char* const kPrefExitTypeNormal; | 58 static const char* const kPrefExitTypeNormal; |
55 | 59 |
56 virtual ~ProfileImpl(); | 60 virtual ~ProfileImpl(); |
57 | 61 |
58 static void RegisterUserPrefs(PrefService* prefs); | 62 static void RegisterUserPrefs(PrefService* prefs); |
(...skipping 29 matching lines...) Expand all Loading... |
88 virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 92 virtual Profile* GetOffTheRecordProfile() OVERRIDE; |
89 virtual void DestroyOffTheRecordProfile() OVERRIDE; | 93 virtual void DestroyOffTheRecordProfile() OVERRIDE; |
90 virtual bool HasOffTheRecordProfile() OVERRIDE; | 94 virtual bool HasOffTheRecordProfile() OVERRIDE; |
91 virtual Profile* GetOriginalProfile() OVERRIDE; | 95 virtual Profile* GetOriginalProfile() OVERRIDE; |
92 virtual history::TopSites* GetTopSites() OVERRIDE; | 96 virtual history::TopSites* GetTopSites() OVERRIDE; |
93 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; | 97 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; |
94 virtual ExtensionService* GetExtensionService() OVERRIDE; | 98 virtual ExtensionService* GetExtensionService() OVERRIDE; |
95 virtual ExtensionSpecialStoragePolicy* | 99 virtual ExtensionSpecialStoragePolicy* |
96 GetExtensionSpecialStoragePolicy() OVERRIDE; | 100 GetExtensionSpecialStoragePolicy() OVERRIDE; |
97 virtual GAIAInfoUpdateService* GetGAIAInfoUpdateService() OVERRIDE; | 101 virtual GAIAInfoUpdateService* GetGAIAInfoUpdateService() OVERRIDE; |
98 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE; | |
99 virtual policy::ManagedModePolicyProvider* | 102 virtual policy::ManagedModePolicyProvider* |
100 GetManagedModePolicyProvider() OVERRIDE; | 103 GetManagedModePolicyProvider() OVERRIDE; |
101 virtual policy::PolicyService* GetPolicyService() OVERRIDE; | 104 virtual policy::PolicyService* GetPolicyService() OVERRIDE; |
102 virtual PrefService* GetPrefs() OVERRIDE; | 105 virtual PrefService* GetPrefs() OVERRIDE; |
103 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE; | 106 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE; |
104 virtual net::URLRequestContextGetter* | 107 virtual net::URLRequestContextGetter* |
105 GetRequestContextForExtensions() OVERRIDE; | 108 GetRequestContextForExtensions() OVERRIDE; |
106 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; | 109 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; |
107 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; | 110 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; |
108 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; | 111 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // !!! BIG HONKING WARNING !!! | 203 // !!! BIG HONKING WARNING !!! |
201 // The order of the members below is important. Do not change it unless | 204 // The order of the members below is important. Do not change it unless |
202 // you know what you're doing. Also, if adding a new member here make sure | 205 // you know what you're doing. Also, if adding a new member here make sure |
203 // that the declaration occurs AFTER things it depends on as destruction | 206 // that the declaration occurs AFTER things it depends on as destruction |
204 // happens in reverse order of declaration. | 207 // happens in reverse order of declaration. |
205 | 208 |
206 #if defined(ENABLE_CONFIGURATION_POLICY) | 209 #if defined(ENABLE_CONFIGURATION_POLICY) |
207 // |prefs_| depends on |policy_service_|, which depends on | 210 // |prefs_| depends on |policy_service_|, which depends on |
208 // |user_cloud_policy_manager_| and |managed_mode_policy_provider_|. | 211 // |user_cloud_policy_manager_| and |managed_mode_policy_provider_|. |
209 // TODO(bauerb, mnissler): Once |prefs_| is a ProfileKeyedService, these | 212 // TODO(bauerb, mnissler): Once |prefs_| is a ProfileKeyedService, these |
210 // should become ProfileKeyedServices as well. | 213 // should become proper ProfileKeyedServices as well. |
| 214 #if !defined(OS_CHROMEOS) |
211 scoped_ptr<policy::UserCloudPolicyManager> cloud_policy_manager_; | 215 scoped_ptr<policy::UserCloudPolicyManager> cloud_policy_manager_; |
| 216 #endif |
212 scoped_ptr<policy::ManagedModePolicyProvider> managed_mode_policy_provider_; | 217 scoped_ptr<policy::ManagedModePolicyProvider> managed_mode_policy_provider_; |
213 #endif | 218 #endif |
214 scoped_ptr<policy::PolicyService> policy_service_; | 219 scoped_ptr<policy::PolicyService> policy_service_; |
215 | 220 |
216 // Keep |prefs_| on top for destruction order because |extension_prefs_|, | 221 // Keep |prefs_| on top for destruction order because |extension_prefs_|, |
217 // |net_pref_observer_|, |promo_resource_service_|, |io_data_| an others store | 222 // |net_pref_observer_|, |promo_resource_service_|, |io_data_| an others store |
218 // pointers to |prefs_| and shall be destructed first. | 223 // pointers to |prefs_| and shall be destructed first. |
219 scoped_ptr<PrefService> prefs_; | 224 scoped_ptr<PrefService> prefs_; |
220 scoped_ptr<PrefService> otr_prefs_; | 225 scoped_ptr<PrefService> otr_prefs_; |
221 ProfileImplIOData::Handle io_data_; | 226 ProfileImplIOData::Handle io_data_; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} | 276 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} |
272 | 277 |
273 Profile::Delegate* delegate_; | 278 Profile::Delegate* delegate_; |
274 | 279 |
275 chrome_browser_net::Predictor* predictor_; | 280 chrome_browser_net::Predictor* predictor_; |
276 | 281 |
277 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 282 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
278 }; | 283 }; |
279 | 284 |
280 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 285 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |