| 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 #pragma once | 9 #pragma once | 
| 10 | 10 | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 54   virtual content::DownloadManager* GetDownloadManager() OVERRIDE; | 54   virtual content::DownloadManager* GetDownloadManager() OVERRIDE; | 
| 55   virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 55   virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 
| 56   virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 56   virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 
| 57       int renderer_child_id) OVERRIDE; | 57       int renderer_child_id) OVERRIDE; | 
| 58   virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE; | 58   virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE; | 
| 59   virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 59   virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 
| 60   virtual content::HostZoomMap* GetHostZoomMap() OVERRIDE; | 60   virtual content::HostZoomMap* GetHostZoomMap() OVERRIDE; | 
| 61   virtual content::GeolocationPermissionContext* | 61   virtual content::GeolocationPermissionContext* | 
| 62       GetGeolocationPermissionContext() OVERRIDE; | 62       GetGeolocationPermissionContext() OVERRIDE; | 
| 63   virtual content::SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; | 63   virtual content::SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; | 
| 64   virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; | 64   virtual bool DidLastSessionExitCleanly() OVERRIDE; | 
| 65   virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; | 65   virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 
| 66   virtual WebKitContext* GetWebKitContext() OVERRIDE; |  | 
| 67   virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; |  | 
| 68   virtual ChromeBlobStorageContext* GetBlobStorageContext() OVERRIDE; |  | 
| 69   virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; |  | 
| 70 | 66 | 
| 71   // Profile implementation: | 67   // Profile implementation: | 
| 72   virtual std::string GetProfileName() OVERRIDE; | 68   virtual std::string GetProfileName() OVERRIDE; | 
| 73   virtual bool IsOffTheRecord() OVERRIDE; | 69   virtual bool IsOffTheRecord() OVERRIDE; | 
| 74   virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 70   virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 
| 75   virtual void DestroyOffTheRecordProfile() OVERRIDE; | 71   virtual void DestroyOffTheRecordProfile() OVERRIDE; | 
| 76   virtual bool HasOffTheRecordProfile() OVERRIDE; | 72   virtual bool HasOffTheRecordProfile() OVERRIDE; | 
| 77   virtual Profile* GetOriginalProfile() OVERRIDE; | 73   virtual Profile* GetOriginalProfile() OVERRIDE; | 
| 78   virtual history::TopSites* GetTopSites() OVERRIDE; | 74   virtual history::TopSites* GetTopSites() OVERRIDE; | 
| 79   virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; | 75   virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 103   virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( | 99   virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( | 
| 104       const std::string& app_id) OVERRIDE; | 100       const std::string& app_id) OVERRIDE; | 
| 105   virtual void RegisterExtensionWithRequestContexts( | 101   virtual void RegisterExtensionWithRequestContexts( | 
| 106       const Extension* extension) OVERRIDE; | 102       const Extension* extension) OVERRIDE; | 
| 107   virtual void UnregisterExtensionWithRequestContexts( | 103   virtual void UnregisterExtensionWithRequestContexts( | 
| 108       const std::string& extension_id, | 104       const std::string& extension_id, | 
| 109       const extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 105       const extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 
| 110   virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; | 106   virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; | 
| 111   virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; | 107   virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; | 
| 112   virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() OVERRIDE; | 108   virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() OVERRIDE; | 
| 113   virtual bool DidLastSessionExitCleanly() OVERRIDE; |  | 
| 114   virtual BookmarkModel* GetBookmarkModel() OVERRIDE; | 109   virtual BookmarkModel* GetBookmarkModel() OVERRIDE; | 
| 115   virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; | 110   virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; | 
| 116   virtual bool IsSameProfile(Profile* profile) OVERRIDE; | 111   virtual bool IsSameProfile(Profile* profile) OVERRIDE; | 
| 117   virtual base::Time GetStartTime() const OVERRIDE; | 112   virtual base::Time GetStartTime() const OVERRIDE; | 
| 118   virtual void MarkAsCleanShutdown() OVERRIDE; | 113   virtual void MarkAsCleanShutdown() OVERRIDE; | 
| 119   virtual void InitExtensions(bool extensions_enabled) OVERRIDE; | 114   virtual void InitExtensions(bool extensions_enabled) OVERRIDE; | 
| 120   virtual void InitPromoResources() OVERRIDE; | 115   virtual void InitPromoResources() OVERRIDE; | 
| 121   virtual void InitRegisteredProtocolHandlers() OVERRIDE; | 116   virtual void InitRegisteredProtocolHandlers() OVERRIDE; | 
| 122   virtual FilePath last_selected_directory() OVERRIDE; | 117   virtual FilePath last_selected_directory() OVERRIDE; | 
| 123   virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; | 118   virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169   void StopCreateSessionServiceTimer(); | 164   void StopCreateSessionServiceTimer(); | 
| 170 | 165 | 
| 171   void EnsureRequestContextCreated() { | 166   void EnsureRequestContextCreated() { | 
| 172     GetRequestContext(); | 167     GetRequestContext(); | 
| 173   } | 168   } | 
| 174 | 169 | 
| 175   void EnsureSessionServiceCreated(); | 170   void EnsureSessionServiceCreated(); | 
| 176 | 171 | 
| 177   ExtensionPrefValueMap* GetExtensionPrefValueMap(); | 172   ExtensionPrefValueMap* GetExtensionPrefValueMap(); | 
| 178 | 173 | 
| 179   void CreateQuotaManagerAndClients(); |  | 
| 180 |  | 
| 181   void UpdateProfileUserNameCache(); | 174   void UpdateProfileUserNameCache(); | 
| 182 | 175 | 
| 183 | 176 | 
| 184   // Updates the ProfileInfoCache with data from this profile. | 177   // Updates the ProfileInfoCache with data from this profile. | 
| 185   void UpdateProfileNameCache(); | 178   void UpdateProfileNameCache(); | 
| 186   void UpdateProfileAvatarCache(); | 179   void UpdateProfileAvatarCache(); | 
| 187 | 180 | 
| 188   void GetCacheParameters(bool is_media_context, | 181   void GetCacheParameters(bool is_media_context, | 
| 189                           FilePath* cache_path, | 182                           FilePath* cache_path, | 
| 190                           int* max_size); | 183                           int* max_size); | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 244       geolocation_permission_context_; | 237       geolocation_permission_context_; | 
| 245   scoped_refptr<content::SpeechInputPreferences> speech_input_preferences_; | 238   scoped_refptr<content::SpeechInputPreferences> speech_input_preferences_; | 
| 246   scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; | 239   scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; | 
| 247   scoped_ptr<GAIAInfoUpdateService> gaia_info_update_service_; | 240   scoped_ptr<GAIAInfoUpdateService> gaia_info_update_service_; | 
| 248   scoped_refptr<HistoryService> history_service_; | 241   scoped_refptr<HistoryService> history_service_; | 
| 249   scoped_ptr<FaviconService> favicon_service_; | 242   scoped_ptr<FaviconService> favicon_service_; | 
| 250   scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 243   scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 
| 251   scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; | 244   scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; | 
| 252   scoped_refptr<WebDataService> web_data_service_; | 245   scoped_refptr<WebDataService> web_data_service_; | 
| 253   scoped_refptr<PasswordStore> password_store_; | 246   scoped_refptr<PasswordStore> password_store_; | 
| 254   scoped_refptr<WebKitContext> webkit_context_; |  | 
| 255   scoped_refptr<fileapi::FileSystemContext> file_system_context_; |  | 
| 256   scoped_refptr<quota::QuotaManager> quota_manager_; |  | 
| 257   bool history_service_created_; | 247   bool history_service_created_; | 
| 258   bool favicon_service_created_; | 248   bool favicon_service_created_; | 
| 259   bool created_web_data_service_; | 249   bool created_web_data_service_; | 
| 260   bool created_password_store_; | 250   bool created_password_store_; | 
| 261   bool clear_local_state_on_exit_; | 251   bool clear_local_state_on_exit_; | 
| 262   // Whether or not the last session exited cleanly. This is set only once. | 252   // Whether or not the last session exited cleanly. This is set only once. | 
| 263   bool last_session_exited_cleanly_; | 253   bool last_session_exited_cleanly_; | 
| 264 | 254 | 
| 265   base::OneShotTimer<ProfileImpl> create_session_service_timer_; | 255   base::OneShotTimer<ProfileImpl> create_session_service_timer_; | 
| 266 | 256 | 
| 267   scoped_ptr<Profile> off_the_record_profile_; | 257   scoped_ptr<Profile> off_the_record_profile_; | 
| 268 | 258 | 
| 269   // See GetStartTime for details. | 259   // See GetStartTime for details. | 
| 270   base::Time start_time_; | 260   base::Time start_time_; | 
| 271 | 261 | 
| 272 #if defined(OS_WIN) | 262 #if defined(OS_WIN) | 
| 273   bool checked_instant_promo_; | 263   bool checked_instant_promo_; | 
| 274   scoped_ptr<PromoCounter> instant_promo_counter_; | 264   scoped_ptr<PromoCounter> instant_promo_counter_; | 
| 275 #endif | 265 #endif | 
| 276 | 266 | 
| 277   // The AppCacheService for this profile, shared by all requests contexts |  | 
| 278   // associated with this profile. Should only be used on the IO thread. |  | 
| 279   scoped_refptr<ChromeAppCacheService> appcache_service_; |  | 
| 280 |  | 
| 281   // The main database tracker for this profile. |  | 
| 282   // Should be used only on the file thread. |  | 
| 283   scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; |  | 
| 284 |  | 
| 285   scoped_refptr<history::TopSites> top_sites_;  // For history and thumbnails. | 267   scoped_refptr<history::TopSites> top_sites_;  // For history and thumbnails. | 
| 286 | 268 | 
| 287   scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |  | 
| 288 |  | 
| 289 #if defined(OS_CHROMEOS) | 269 #if defined(OS_CHROMEOS) | 
| 290   scoped_ptr<chromeos::Preferences> chromeos_preferences_; | 270   scoped_ptr<chromeos::Preferences> chromeos_preferences_; | 
| 291 | 271 | 
| 292   scoped_ptr<chromeos::EnterpriseExtensionObserver> | 272   scoped_ptr<chromeos::EnterpriseExtensionObserver> | 
| 293       chromeos_enterprise_extension_observer_; | 273       chromeos_enterprise_extension_observer_; | 
| 294 | 274 | 
| 295   scoped_ptr<chromeos::LocaleChangeGuard> locale_change_guard_; | 275   scoped_ptr<chromeos::LocaleChangeGuard> locale_change_guard_; | 
| 296 #endif | 276 #endif | 
| 297 | 277 | 
| 298   scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 278   scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 316   Profile::Delegate* delegate_; | 296   Profile::Delegate* delegate_; | 
| 317 | 297 | 
| 318   chrome_browser_net::Predictor* predictor_; | 298   chrome_browser_net::Predictor* predictor_; | 
| 319 | 299 | 
| 320   bool session_restore_enabled_; | 300   bool session_restore_enabled_; | 
| 321 | 301 | 
| 322   DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 302   DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 
| 323 }; | 303 }; | 
| 324 | 304 | 
| 325 #endif  // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 305 #endif  // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 
| OLD | NEW | 
|---|