| 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> |
| 11 | 11 |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/prefs/public/pref_change_registrar.h" | 16 #include "base/prefs/public/pref_change_registrar.h" |
| 17 #include "base/timer.h" | 17 #include "base/timer.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_impl_io_data.h" | 19 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 20 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
| 22 | 22 |
| 23 class NetPrefObserver; | 23 class NetPrefObserver; |
| 24 class PrefRegistrySyncable; |
| 25 class PrefService; |
| 26 class PrefServiceBase; |
| 24 class PrefServiceSyncable; | 27 class PrefServiceSyncable; |
| 25 class PrefServiceBase; | |
| 26 class SSLConfigServiceManager; | 28 class SSLConfigServiceManager; |
| 27 | 29 |
| 28 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
| 29 namespace chromeos { | 31 namespace chromeos { |
| 30 class EnterpriseExtensionObserver; | 32 class EnterpriseExtensionObserver; |
| 31 class LocaleChangeGuard; | 33 class LocaleChangeGuard; |
| 32 class Preferences; | 34 class Preferences; |
| 33 } | 35 } |
| 34 #endif | 36 #endif |
| 35 | 37 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 51 | 53 |
| 52 // The default profile implementation. | 54 // The default profile implementation. |
| 53 class ProfileImpl : public Profile, | 55 class ProfileImpl : public Profile, |
| 54 public content::NotificationObserver { | 56 public content::NotificationObserver { |
| 55 public: | 57 public: |
| 56 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. | 58 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. |
| 57 static const char* const kPrefExitTypeNormal; | 59 static const char* const kPrefExitTypeNormal; |
| 58 | 60 |
| 59 virtual ~ProfileImpl(); | 61 virtual ~ProfileImpl(); |
| 60 | 62 |
| 61 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 63 static void RegisterUserPrefs(PrefRegistrySyncable* registry); |
| 62 | 64 |
| 63 // content::BrowserContext implementation: | 65 // content::BrowserContext implementation: |
| 64 virtual FilePath GetPath() OVERRIDE; | 66 virtual FilePath GetPath() OVERRIDE; |
| 65 virtual content::DownloadManagerDelegate* | 67 virtual content::DownloadManagerDelegate* |
| 66 GetDownloadManagerDelegate() OVERRIDE; | 68 GetDownloadManagerDelegate() OVERRIDE; |
| 67 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 69 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
| 68 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 70 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| 69 int renderer_child_id) OVERRIDE; | 71 int renderer_child_id) OVERRIDE; |
| 70 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( | 72 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( |
| 71 const FilePath& partition_path, | 73 const FilePath& partition_path, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 93 virtual bool HasOffTheRecordProfile() OVERRIDE; | 95 virtual bool HasOffTheRecordProfile() OVERRIDE; |
| 94 virtual Profile* GetOriginalProfile() OVERRIDE; | 96 virtual Profile* GetOriginalProfile() OVERRIDE; |
| 95 virtual history::TopSites* GetTopSites() OVERRIDE; | 97 virtual history::TopSites* GetTopSites() OVERRIDE; |
| 96 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; | 98 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; |
| 97 virtual ExtensionService* GetExtensionService() OVERRIDE; | 99 virtual ExtensionService* GetExtensionService() OVERRIDE; |
| 98 virtual ExtensionSpecialStoragePolicy* | 100 virtual ExtensionSpecialStoragePolicy* |
| 99 GetExtensionSpecialStoragePolicy() OVERRIDE; | 101 GetExtensionSpecialStoragePolicy() OVERRIDE; |
| 100 virtual policy::ManagedModePolicyProvider* | 102 virtual policy::ManagedModePolicyProvider* |
| 101 GetManagedModePolicyProvider() OVERRIDE; | 103 GetManagedModePolicyProvider() OVERRIDE; |
| 102 virtual policy::PolicyService* GetPolicyService() OVERRIDE; | 104 virtual policy::PolicyService* GetPolicyService() OVERRIDE; |
| 103 virtual PrefServiceSyncable* GetPrefs() OVERRIDE; | 105 virtual PrefService* GetPrefs() OVERRIDE; |
| 104 virtual PrefServiceSyncable* GetOffTheRecordPrefs() OVERRIDE; | 106 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE; |
| 105 virtual net::URLRequestContextGetter* | 107 virtual net::URLRequestContextGetter* |
| 106 GetRequestContextForExtensions() OVERRIDE; | 108 GetRequestContextForExtensions() OVERRIDE; |
| 107 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; | 109 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; |
| 108 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; | 110 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; |
| 109 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; | 111 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; |
| 110 virtual bool IsSameProfile(Profile* profile) OVERRIDE; | 112 virtual bool IsSameProfile(Profile* profile) OVERRIDE; |
| 111 virtual base::Time GetStartTime() const OVERRIDE; | 113 virtual base::Time GetStartTime() const OVERRIDE; |
| 112 virtual FilePath last_selected_directory() OVERRIDE; | 114 virtual FilePath last_selected_directory() OVERRIDE; |
| 113 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; | 115 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; |
| 114 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; | 116 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 #if !defined(OS_CHROMEOS) | 211 #if !defined(OS_CHROMEOS) |
| 210 scoped_ptr<policy::UserCloudPolicyManager> cloud_policy_manager_; | 212 scoped_ptr<policy::UserCloudPolicyManager> cloud_policy_manager_; |
| 211 #endif | 213 #endif |
| 212 scoped_ptr<policy::ManagedModePolicyProvider> managed_mode_policy_provider_; | 214 scoped_ptr<policy::ManagedModePolicyProvider> managed_mode_policy_provider_; |
| 213 #endif | 215 #endif |
| 214 scoped_ptr<policy::PolicyService> policy_service_; | 216 scoped_ptr<policy::PolicyService> policy_service_; |
| 215 | 217 |
| 216 // Keep |prefs_| on top for destruction order because |extension_prefs_|, | 218 // Keep |prefs_| on top for destruction order because |extension_prefs_|, |
| 217 // |net_pref_observer_|, |io_data_| an others store pointers to |prefs_| and | 219 // |net_pref_observer_|, |io_data_| an others store pointers to |prefs_| and |
| 218 // shall be destructed first. | 220 // shall be destructed first. |
| 221 scoped_refptr<PrefRegistrySyncable> pref_registry_; |
| 219 scoped_ptr<PrefServiceSyncable> prefs_; | 222 scoped_ptr<PrefServiceSyncable> prefs_; |
| 220 scoped_ptr<PrefServiceSyncable> otr_prefs_; | 223 scoped_ptr<PrefServiceSyncable> otr_prefs_; |
| 221 ProfileImplIOData::Handle io_data_; | 224 ProfileImplIOData::Handle io_data_; |
| 222 scoped_refptr<ExtensionSpecialStoragePolicy> | 225 scoped_refptr<ExtensionSpecialStoragePolicy> |
| 223 extension_special_storage_policy_; | 226 extension_special_storage_policy_; |
| 224 scoped_ptr<NetPrefObserver> net_pref_observer_; | 227 scoped_ptr<NetPrefObserver> net_pref_observer_; |
| 225 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; | 228 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; |
| 226 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 229 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 227 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; | 230 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; |
| 228 | 231 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} | 270 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} |
| 268 | 271 |
| 269 Profile::Delegate* delegate_; | 272 Profile::Delegate* delegate_; |
| 270 | 273 |
| 271 chrome_browser_net::Predictor* predictor_; | 274 chrome_browser_net::Predictor* predictor_; |
| 272 | 275 |
| 273 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 276 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 274 }; | 277 }; |
| 275 | 278 |
| 276 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 279 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |