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