Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 | 37 |
| 38 // The default profile implementation. | 38 // The default profile implementation. |
| 39 class ProfileImpl : public Profile, | 39 class ProfileImpl : public Profile, |
| 40 public NotificationObserver { | 40 public NotificationObserver { |
| 41 public: | 41 public: |
| 42 virtual ~ProfileImpl(); | 42 virtual ~ProfileImpl(); |
| 43 | 43 |
| 44 static void RegisterUserPrefs(PrefService* prefs); | 44 static void RegisterUserPrefs(PrefService* prefs); |
| 45 | 45 |
| 46 // Profile implementation. | 46 // Profile implementation. |
| 47 virtual std::string GetProfileName(); | 47 virtual std::string GetProfileName() OVERRIDE; |
| 48 virtual FilePath GetPath(); | 48 virtual FilePath GetPath() OVERRIDE; |
| 49 virtual bool IsOffTheRecord(); | 49 virtual bool IsOffTheRecord() OVERRIDE; |
| 50 virtual Profile* GetOffTheRecordProfile(); | 50 virtual Profile* GetOffTheRecordProfile() OVERRIDE; |
| 51 virtual void DestroyOffTheRecordProfile(); | 51 virtual void DestroyOffTheRecordProfile() OVERRIDE; |
| 52 virtual bool HasOffTheRecordProfile(); | 52 virtual bool HasOffTheRecordProfile() OVERRIDE; |
| 53 virtual Profile* GetOriginalProfile(); | 53 virtual Profile* GetOriginalProfile() OVERRIDE; |
| 54 virtual ChromeAppCacheService* GetAppCacheService(); | 54 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; |
| 55 virtual webkit_database::DatabaseTracker* GetDatabaseTracker(); | 55 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; |
| 56 virtual history::TopSites* GetTopSites(); | 56 virtual history::TopSites* GetTopSites() OVERRIDE; |
| 57 virtual history::TopSites* GetTopSitesWithoutCreating(); | 57 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; |
| 58 virtual VisitedLinkMaster* GetVisitedLinkMaster(); | 58 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE; |
| 59 virtual UserScriptMaster* GetUserScriptMaster(); | 59 virtual UserScriptMaster* GetUserScriptMaster() OVERRIDE; |
| 60 virtual SSLHostState* GetSSLHostState(); | 60 virtual SSLHostState* GetSSLHostState() OVERRIDE; |
| 61 virtual ExtensionService* GetExtensionService(); | 61 virtual ExtensionService* GetExtensionService() OVERRIDE; |
| 62 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager(); | 62 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager() OVERRIDE; |
| 63 virtual ExtensionProcessManager* GetExtensionProcessManager(); | 63 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE; |
| 64 virtual ExtensionMessageService* GetExtensionMessageService(); | 64 virtual ExtensionMessageService* GetExtensionMessageService() OVERRIDE; |
| 65 virtual ExtensionEventRouter* GetExtensionEventRouter(); | 65 virtual ExtensionEventRouter* GetExtensionEventRouter() OVERRIDE; |
| 66 virtual ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy(); | 66 virtual ExtensionSpecialStoragePolicy* |
| 67 virtual FaviconService* GetFaviconService(ServiceAccessType sat); | 67 GetExtensionSpecialStoragePolicy() OVERRIDE; |
| 68 virtual HistoryService* GetHistoryService(ServiceAccessType sat); | 68 virtual FaviconService* GetFaviconService(ServiceAccessType sat) OVERRIDE; |
| 69 virtual HistoryService* GetHistoryServiceWithoutCreating(); | 69 virtual HistoryService* GetHistoryService(ServiceAccessType sat) OVERRIDE; |
| 70 virtual AutocompleteClassifier* GetAutocompleteClassifier(); | 70 virtual HistoryService* GetHistoryServiceWithoutCreating() OVERRIDE; |
| 71 virtual history::ShortcutsBackend* GetShortcutsBackend(); | 71 virtual AutocompleteClassifier* GetAutocompleteClassifier() OVERRIDE; |
| 72 virtual WebDataService* GetWebDataService(ServiceAccessType sat); | 72 virtual history::ShortcutsBackend* GetShortcutsBackend() OVERRIDE; |
| 73 virtual WebDataService* GetWebDataServiceWithoutCreating(); | 73 virtual WebDataService* GetWebDataService(ServiceAccessType sat) OVERRIDE; |
| 74 virtual PasswordStore* GetPasswordStore(ServiceAccessType sat); | 74 virtual WebDataService* GetWebDataServiceWithoutCreating() OVERRIDE; |
| 75 virtual PrefService* GetPrefs(); | 75 virtual PasswordStore* GetPasswordStore(ServiceAccessType sat) OVERRIDE; |
| 76 virtual PrefService* GetOffTheRecordPrefs(); | 76 virtual PrefService* GetPrefs() OVERRIDE; |
| 77 virtual TemplateURLFetcher* GetTemplateURLFetcher(); | 77 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE; |
| 78 virtual DownloadManager* GetDownloadManager(); | 78 virtual TemplateURLFetcher* GetTemplateURLFetcher() OVERRIDE; |
| 79 virtual PersonalDataManager* GetPersonalDataManager(); | 79 virtual DownloadManager* GetDownloadManager() OVERRIDE; |
| 80 virtual fileapi::FileSystemContext* GetFileSystemContext(); | 80 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE; |
| 81 virtual quota::QuotaManager* GetQuotaManager(); | 81 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; |
| 82 virtual bool HasCreatedDownloadManager() const; | 82 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; |
| 83 virtual net::URLRequestContextGetter* GetRequestContext(); | 83 virtual bool HasCreatedDownloadManager() const OVERRIDE; |
| 84 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | |
| 84 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 85 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| 85 int renderer_child_id); | 86 int renderer_child_id) OVERRIDE; |
| 86 virtual net::URLRequestContextGetter* GetRequestContextForMedia(); | 87 virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE; |
| 87 virtual net::URLRequestContextGetter* GetRequestContextForExtensions(); | 88 virtual net::URLRequestContextGetter* |
| 89 GetRequestContextForExtensions() OVERRIDE; | |
| 88 virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( | 90 virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( |
| 89 const std::string& app_id); | 91 const std::string& app_id) OVERRIDE; |
| 90 virtual const content::ResourceContext& GetResourceContext(); | 92 virtual const content::ResourceContext& GetResourceContext() OVERRIDE; |
| 91 virtual void RegisterExtensionWithRequestContexts(const Extension* extension); | 93 virtual void RegisterExtensionWithRequestContexts( |
| 94 const Extension* extension) OVERRIDE; | |
| 92 virtual void UnregisterExtensionWithRequestContexts( | 95 virtual void UnregisterExtensionWithRequestContexts( |
| 93 const std::string& extension_id, | 96 const std::string& extension_id, |
| 94 const extension_misc::UnloadedExtensionReason reason); | 97 const extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
| 95 virtual net::SSLConfigService* GetSSLConfigService(); | 98 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; |
| 96 virtual HostContentSettingsMap* GetHostContentSettingsMap(); | 99 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; |
| 97 virtual HostZoomMap* GetHostZoomMap(); | 100 virtual HostZoomMap* GetHostZoomMap() OVERRIDE; |
| 98 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); | 101 virtual GeolocationPermissionContext* |
| 99 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); | 102 GetGeolocationPermissionContext() OVERRIDE; |
| 100 virtual FindBarState* GetFindBarState(); | 103 virtual SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; |
| 101 virtual bool HasProfileSyncService() const; | 104 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() OVERRIDE; |
| 102 virtual bool DidLastSessionExitCleanly(); | 105 virtual FindBarState* GetFindBarState() OVERRIDE; |
| 103 virtual BookmarkModel* GetBookmarkModel(); | 106 virtual bool HasProfileSyncService() const OVERRIDE; |
| 104 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 107 virtual bool DidLastSessionExitCleanly() OVERRIDE; |
| 105 virtual bool IsSameProfile(Profile* profile); | 108 virtual BookmarkModel* GetBookmarkModel() OVERRIDE; |
| 106 virtual base::Time GetStartTime() const; | 109 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; |
| 107 virtual SpellCheckHost* GetSpellCheckHost(); | 110 virtual bool IsSameProfile(Profile* profile) OVERRIDE; |
| 108 virtual void ReinitializeSpellCheckHost(bool force); | 111 virtual base::Time GetStartTime() const OVERRIDE; |
| 109 virtual WebKitContext* GetWebKitContext(); | 112 virtual SpellCheckHost* GetSpellCheckHost() OVERRIDE; |
| 110 virtual void MarkAsCleanShutdown(); | 113 virtual void ReinitializeSpellCheckHost(bool force) OVERRIDE; |
| 111 virtual void InitExtensions(bool extensions_enabled); | 114 virtual WebKitContext* GetWebKitContext() OVERRIDE; |
| 112 virtual void InitPromoResources(); | 115 virtual void MarkAsCleanShutdown() OVERRIDE; |
| 113 virtual void InitRegisteredProtocolHandlers(); | 116 virtual void InitExtensions(bool extensions_enabled) OVERRIDE; |
| 114 virtual FilePath last_selected_directory(); | 117 virtual void InitPromoResources() OVERRIDE; |
| 115 virtual void set_last_selected_directory(const FilePath& path); | 118 virtual void InitRegisteredProtocolHandlers() OVERRIDE; |
| 116 virtual ProfileSyncService* GetProfileSyncService(); | 119 virtual FilePath last_selected_directory() OVERRIDE; |
| 120 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; | |
| 121 virtual ProfileSyncService* GetProfileSyncService() OVERRIDE; | |
| 117 virtual ProfileSyncService* GetProfileSyncService( | 122 virtual ProfileSyncService* GetProfileSyncService( |
| 118 const std::string& cros_user); | 123 const std::string& cros_user) OVERRIDE; |
| 119 virtual TokenService* GetTokenService(); | 124 virtual TokenService* GetTokenService() OVERRIDE; |
| 120 void InitSyncService(const std::string& cros_user); | 125 void InitSyncService(const std::string& cros_user); |
| 121 virtual ChromeBlobStorageContext* GetBlobStorageContext(); | 126 virtual ChromeBlobStorageContext* GetBlobStorageContext() OVERRIDE; |
| 122 virtual ExtensionInfoMap* GetExtensionInfoMap(); | 127 virtual ExtensionInfoMap* GetExtensionInfoMap() OVERRIDE; |
| 123 virtual PromoCounter* GetInstantPromoCounter(); | 128 virtual PromoCounter* GetInstantPromoCounter() OVERRIDE; |
| 124 virtual ChromeURLDataManager* GetChromeURLDataManager(); | 129 virtual ChromeURLDataManager* GetChromeURLDataManager() OVERRIDE; |
| 125 virtual chrome_browser_net::Predictor* GetNetworkPredictor(); | 130 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; |
| 126 virtual void DeleteTransportSecurityStateSince(base::Time time); | 131 virtual void DeleteTransportSecurityStateSince(base::Time time) OVERRIDE; |
| 127 | 132 |
| 128 #if defined(OS_CHROMEOS) | 133 #if defined(OS_CHROMEOS) |
| 129 virtual void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia); | 134 virtual void ChangeAppLocale(const std::string& locale, |
| 130 virtual void OnLogin(); | 135 AppLocaleChangedVia) OVERRIDE; |
| 131 virtual void SetupChromeOSEnterpriseExtensionObserver(); | 136 virtual void OnLogin() OVERRIDE; |
| 132 virtual void InitChromeOSPreferences(); | 137 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE; |
| 138 virtual void InitChromeOSPreferences() OVERRIDE; | |
| 133 #endif // defined(OS_CHROMEOS) | 139 #endif // defined(OS_CHROMEOS) |
| 134 | 140 |
| 135 virtual PrefProxyConfigTracker* GetProxyConfigTracker(); | 141 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE; |
| 136 virtual prerender::PrerenderManager* GetPrerenderManager(); | 142 virtual prerender::PrerenderManager* GetPrerenderManager() OVERRIDE; |
| 137 | 143 |
| 138 // NotificationObserver implementation. | 144 // NotificationObserver implementation. |
| 139 virtual void Observe(int type, | 145 virtual void Observe(int type, |
| 140 const NotificationSource& source, | 146 const NotificationSource& source, |
| 141 const NotificationDetails& details); | 147 const NotificationDetails& details) OVERRIDE; |
| 142 | 148 |
| 143 private: | 149 private: |
| 144 friend class Profile; | 150 friend class Profile; |
| 145 | 151 |
| 146 ProfileImpl(const FilePath& path, | 152 ProfileImpl(const FilePath& path, |
| 147 Profile::Delegate* delegate); | 153 Profile::Delegate* delegate); |
| 148 | 154 |
| 149 // Does final initialization. Should be called after prefs were loaded. | 155 // Does final initialization. Should be called after prefs were loaded. |
| 150 void DoFinalInit(); | 156 void DoFinalInit(); |
| 151 | 157 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 scoped_ptr<ProfileSyncService> sync_service_; | 226 scoped_ptr<ProfileSyncService> sync_service_; |
| 221 | 227 |
| 222 ProfileImplIOData::Handle io_data_; | 228 ProfileImplIOData::Handle io_data_; |
| 223 | 229 |
| 224 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; | 230 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; |
| 225 | 231 |
| 226 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 232 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 227 scoped_refptr<HostZoomMap> host_zoom_map_; | 233 scoped_refptr<HostZoomMap> host_zoom_map_; |
| 228 scoped_refptr<GeolocationPermissionContext> | 234 scoped_refptr<GeolocationPermissionContext> |
| 229 geolocation_permission_context_; | 235 geolocation_permission_context_; |
| 236 scoped_refptr<SpeechInputPreferences> speech_input_preferences_; | |
|
Satish
2011/09/23 16:31:54
should we include speech_input_preferences.h in th
allanwoj
2011/09/26 13:05:15
Done.
| |
| 230 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; | 237 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; |
| 231 scoped_ptr<FindBarState> find_bar_state_; | 238 scoped_ptr<FindBarState> find_bar_state_; |
| 232 scoped_refptr<ChromeDownloadManagerDelegate> download_manager_delegate_; | 239 scoped_refptr<ChromeDownloadManagerDelegate> download_manager_delegate_; |
| 233 scoped_refptr<DownloadManager> download_manager_; | 240 scoped_refptr<DownloadManager> download_manager_; |
| 234 scoped_refptr<HistoryService> history_service_; | 241 scoped_refptr<HistoryService> history_service_; |
| 235 scoped_ptr<FaviconService> favicon_service_; | 242 scoped_ptr<FaviconService> favicon_service_; |
| 236 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 243 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; |
| 237 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; | 244 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; |
| 238 scoped_refptr<WebDataService> web_data_service_; | 245 scoped_refptr<WebDataService> web_data_service_; |
| 239 scoped_refptr<PasswordStore> password_store_; | 246 scoped_refptr<PasswordStore> password_store_; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; | 299 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; |
| 293 | 300 |
| 294 Profile::Delegate* delegate_; | 301 Profile::Delegate* delegate_; |
| 295 | 302 |
| 296 chrome_browser_net::Predictor* predictor_; | 303 chrome_browser_net::Predictor* predictor_; |
| 297 | 304 |
| 298 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 305 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 299 }; | 306 }; |
| 300 | 307 |
| 301 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 308 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |