| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual void RegisterExtensionWithRequestContexts(const Extension* extension); | 91 virtual void RegisterExtensionWithRequestContexts(const Extension* extension); |
| 92 virtual void UnregisterExtensionWithRequestContexts( | 92 virtual void UnregisterExtensionWithRequestContexts( |
| 93 const Extension* extension); | 93 const Extension* extension); |
| 94 virtual net::SSLConfigService* GetSSLConfigService(); | 94 virtual net::SSLConfigService* GetSSLConfigService(); |
| 95 virtual HostContentSettingsMap* GetHostContentSettingsMap(); | 95 virtual HostContentSettingsMap* GetHostContentSettingsMap(); |
| 96 virtual HostZoomMap* GetHostZoomMap(); | 96 virtual HostZoomMap* GetHostZoomMap(); |
| 97 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); | 97 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); |
| 98 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); | 98 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); |
| 99 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); | 99 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); |
| 100 virtual FindBarState* GetFindBarState(); | 100 virtual FindBarState* GetFindBarState(); |
| 101 virtual SessionService* GetSessionService(); | |
| 102 virtual void ShutdownSessionService(); | |
| 103 virtual bool HasSessionService() const; | |
| 104 virtual bool HasProfileSyncService() const; | 101 virtual bool HasProfileSyncService() const; |
| 105 virtual bool DidLastSessionExitCleanly(); | 102 virtual bool DidLastSessionExitCleanly(); |
| 106 virtual BookmarkModel* GetBookmarkModel(); | 103 virtual BookmarkModel* GetBookmarkModel(); |
| 107 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 104 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
| 108 virtual bool IsSameProfile(Profile* profile); | 105 virtual bool IsSameProfile(Profile* profile); |
| 109 virtual base::Time GetStartTime() const; | 106 virtual base::Time GetStartTime() const; |
| 110 virtual TabRestoreService* GetTabRestoreService(); | |
| 111 virtual void ResetTabRestoreService(); | |
| 112 virtual SpellCheckHost* GetSpellCheckHost(); | 107 virtual SpellCheckHost* GetSpellCheckHost(); |
| 113 virtual void ReinitializeSpellCheckHost(bool force); | 108 virtual void ReinitializeSpellCheckHost(bool force); |
| 114 virtual WebKitContext* GetWebKitContext(); | 109 virtual WebKitContext* GetWebKitContext(); |
| 115 virtual StatusTray* GetStatusTray(); | 110 virtual StatusTray* GetStatusTray(); |
| 116 virtual void MarkAsCleanShutdown(); | 111 virtual void MarkAsCleanShutdown(); |
| 117 virtual void InitExtensions(bool extensions_enabled); | 112 virtual void InitExtensions(bool extensions_enabled); |
| 118 virtual void InitPromoResources(); | 113 virtual void InitPromoResources(); |
| 119 virtual void InitRegisteredProtocolHandlers(); | 114 virtual void InitRegisteredProtocolHandlers(); |
| 120 virtual NTPResourceCache* GetNTPResourceCache(); | 115 virtual NTPResourceCache* GetNTPResourceCache(); |
| 121 virtual FilePath last_selected_directory(); | 116 virtual FilePath last_selected_directory(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 FilePath GetPrefFilePath(); | 164 FilePath GetPrefFilePath(); |
| 170 | 165 |
| 171 void CreatePasswordStore(); | 166 void CreatePasswordStore(); |
| 172 | 167 |
| 173 void StopCreateSessionServiceTimer(); | 168 void StopCreateSessionServiceTimer(); |
| 174 | 169 |
| 175 void EnsureRequestContextCreated() { | 170 void EnsureRequestContextCreated() { |
| 176 GetRequestContext(); | 171 GetRequestContext(); |
| 177 } | 172 } |
| 178 | 173 |
| 179 void EnsureSessionServiceCreated() { | 174 void EnsureSessionServiceCreated(); |
| 180 GetSessionService(); | |
| 181 } | |
| 182 | 175 |
| 183 void RegisterComponentExtensions(); | 176 void RegisterComponentExtensions(); |
| 184 | 177 |
| 185 ExtensionPrefValueMap* GetExtensionPrefValueMap(); | 178 ExtensionPrefValueMap* GetExtensionPrefValueMap(); |
| 186 | 179 |
| 187 NotificationRegistrar registrar_; | 180 NotificationRegistrar registrar_; |
| 188 PrefChangeRegistrar pref_change_registrar_; | 181 PrefChangeRegistrar pref_change_registrar_; |
| 189 | 182 |
| 190 FilePath path_; | 183 FilePath path_; |
| 191 FilePath base_cache_path_; | 184 FilePath base_cache_path_; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 scoped_refptr<GeolocationPermissionContext> | 232 scoped_refptr<GeolocationPermissionContext> |
| 240 geolocation_permission_context_; | 233 geolocation_permission_context_; |
| 241 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; | 234 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; |
| 242 scoped_ptr<FindBarState> find_bar_state_; | 235 scoped_ptr<FindBarState> find_bar_state_; |
| 243 scoped_refptr<DownloadManager> download_manager_; | 236 scoped_refptr<DownloadManager> download_manager_; |
| 244 scoped_refptr<HistoryService> history_service_; | 237 scoped_refptr<HistoryService> history_service_; |
| 245 scoped_refptr<FaviconService> favicon_service_; | 238 scoped_refptr<FaviconService> favicon_service_; |
| 246 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 239 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; |
| 247 scoped_refptr<WebDataService> web_data_service_; | 240 scoped_refptr<WebDataService> web_data_service_; |
| 248 scoped_refptr<PasswordStore> password_store_; | 241 scoped_refptr<PasswordStore> password_store_; |
| 249 scoped_ptr<SessionService> session_service_; | |
| 250 scoped_refptr<WebKitContext> webkit_context_; | 242 scoped_refptr<WebKitContext> webkit_context_; |
| 251 scoped_ptr<StatusTray> status_tray_; | 243 scoped_ptr<StatusTray> status_tray_; |
| 252 scoped_refptr<PersonalDataManager> personal_data_manager_; | 244 scoped_refptr<PersonalDataManager> personal_data_manager_; |
| 253 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 245 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 254 scoped_ptr<BrowserSignin> browser_signin_; | 246 scoped_ptr<BrowserSignin> browser_signin_; |
| 255 bool history_service_created_; | 247 bool history_service_created_; |
| 256 bool favicon_service_created_; | 248 bool favicon_service_created_; |
| 257 bool created_web_data_service_; | 249 bool created_web_data_service_; |
| 258 bool created_password_store_; | 250 bool created_password_store_; |
| 259 bool created_download_manager_; | 251 bool created_download_manager_; |
| 260 bool clear_local_state_on_exit_; | 252 bool clear_local_state_on_exit_; |
| 261 // Whether or not the last session exited cleanly. This is set only once. | 253 // Whether or not the last session exited cleanly. This is set only once. |
| 262 bool last_session_exited_cleanly_; | 254 bool last_session_exited_cleanly_; |
| 263 | 255 |
| 264 base::OneShotTimer<ProfileImpl> create_session_service_timer_; | 256 base::OneShotTimer<ProfileImpl> create_session_service_timer_; |
| 265 | 257 |
| 266 scoped_ptr<Profile> off_the_record_profile_; | 258 scoped_ptr<Profile> off_the_record_profile_; |
| 267 | 259 |
| 268 // See GetStartTime for details. | 260 // See GetStartTime for details. |
| 269 base::Time start_time_; | 261 base::Time start_time_; |
| 270 | 262 |
| 271 scoped_ptr<TabRestoreService> tab_restore_service_; | |
| 272 | |
| 273 scoped_refptr<SpellCheckHost> spellcheck_host_; | 263 scoped_refptr<SpellCheckHost> spellcheck_host_; |
| 274 | 264 |
| 275 // Indicates whether |spellcheck_host_| has told us initialization is | 265 // Indicates whether |spellcheck_host_| has told us initialization is |
| 276 // finished. | 266 // finished. |
| 277 bool spellcheck_host_ready_; | 267 bool spellcheck_host_ready_; |
| 278 | 268 |
| 279 #if defined(OS_WIN) | 269 #if defined(OS_WIN) |
| 280 bool checked_instant_promo_; | 270 bool checked_instant_promo_; |
| 281 scoped_ptr<PromoCounter> instant_promo_counter_; | 271 scoped_ptr<PromoCounter> instant_promo_counter_; |
| 282 #endif | 272 #endif |
| 283 | 273 |
| 284 // Set to true when ShutdownSessionService is invoked. If true | |
| 285 // GetSessionService won't recreate the SessionService. | |
| 286 bool shutdown_session_service_; | |
| 287 | |
| 288 // The AppCacheService for this profile, shared by all requests contexts | 274 // The AppCacheService for this profile, shared by all requests contexts |
| 289 // associated with this profile. Should only be used on the IO thread. | 275 // associated with this profile. Should only be used on the IO thread. |
| 290 scoped_refptr<ChromeAppCacheService> appcache_service_; | 276 scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 291 | 277 |
| 292 // The main database tracker for this profile. | 278 // The main database tracker for this profile. |
| 293 // Should be used only on the file thread. | 279 // Should be used only on the file thread. |
| 294 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; | 280 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; |
| 295 | 281 |
| 296 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. | 282 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. |
| 297 | 283 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 311 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 297 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 312 | 298 |
| 313 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; | 299 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; |
| 314 | 300 |
| 315 Profile::Delegate* delegate_; | 301 Profile::Delegate* delegate_; |
| 316 | 302 |
| 317 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 303 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 318 }; | 304 }; |
| 319 | 305 |
| 320 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 306 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |