| 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 |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/timer.h" | 14 #include "base/timer.h" |
| 15 #include "chrome/browser/prefs/pref_change_registrar.h" | 15 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/profiles/profile_impl_io_data.h" | 17 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 18 #include "chrome/browser/spellcheck_host_observer.h" | 18 #include "chrome/browser/spellcheck_host_observer.h" |
| 19 #include "content/common/notification_observer.h" | 19 #include "content/common/notification_observer.h" |
| 20 #include "content/common/notification_registrar.h" | 20 #include "content/common/notification_registrar.h" |
| 21 | 21 |
| 22 class BackgroundModeManager; | |
| 23 class ExtensionPrefs; | 22 class ExtensionPrefs; |
| 24 class ExtensionPrefValueMap; | 23 class ExtensionPrefValueMap; |
| 25 class PrefService; | 24 class PrefService; |
| 26 | 25 |
| 27 #if defined(OS_CHROMEOS) | 26 #if defined(OS_CHROMEOS) |
| 28 namespace chromeos { | 27 namespace chromeos { |
| 29 class EnterpriseExtensionObserver; | 28 class EnterpriseExtensionObserver; |
| 30 class LocaleChangeGuard; | 29 class LocaleChangeGuard; |
| 31 class Preferences; | 30 class Preferences; |
| 32 } | 31 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 virtual bool DidLastSessionExitCleanly(); | 103 virtual bool DidLastSessionExitCleanly(); |
| 105 virtual BookmarkModel* GetBookmarkModel(); | 104 virtual BookmarkModel* GetBookmarkModel(); |
| 106 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 105 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
| 107 virtual bool IsSameProfile(Profile* profile); | 106 virtual bool IsSameProfile(Profile* profile); |
| 108 virtual base::Time GetStartTime() const; | 107 virtual base::Time GetStartTime() const; |
| 109 virtual TabRestoreService* GetTabRestoreService(); | 108 virtual TabRestoreService* GetTabRestoreService(); |
| 110 virtual void ResetTabRestoreService(); | 109 virtual void ResetTabRestoreService(); |
| 111 virtual SpellCheckHost* GetSpellCheckHost(); | 110 virtual SpellCheckHost* GetSpellCheckHost(); |
| 112 virtual void ReinitializeSpellCheckHost(bool force); | 111 virtual void ReinitializeSpellCheckHost(bool force); |
| 113 virtual WebKitContext* GetWebKitContext(); | 112 virtual WebKitContext* GetWebKitContext(); |
| 114 virtual BackgroundContentsService* GetBackgroundContentsService() const; | |
| 115 virtual StatusTray* GetStatusTray(); | 113 virtual StatusTray* GetStatusTray(); |
| 116 virtual void MarkAsCleanShutdown(); | 114 virtual void MarkAsCleanShutdown(); |
| 117 virtual void InitExtensions(); | 115 virtual void InitExtensions(); |
| 118 virtual void InitPromoResources(); | 116 virtual void InitPromoResources(); |
| 119 virtual void InitRegisteredProtocolHandlers(); | 117 virtual void InitRegisteredProtocolHandlers(); |
| 120 virtual NTPResourceCache* GetNTPResourceCache(); | 118 virtual NTPResourceCache* GetNTPResourceCache(); |
| 121 virtual FilePath last_selected_directory(); | 119 virtual FilePath last_selected_directory(); |
| 122 virtual void set_last_selected_directory(const FilePath& path); | 120 virtual void set_last_selected_directory(const FilePath& path); |
| 123 virtual ProfileSyncService* GetProfileSyncService(); | 121 virtual ProfileSyncService* GetProfileSyncService(); |
| 124 virtual ProfileSyncService* GetProfileSyncService( | 122 virtual ProfileSyncService* GetProfileSyncService( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 175 |
| 178 ExtensionPrefValueMap* GetExtensionPrefValueMap(); | 176 ExtensionPrefValueMap* GetExtensionPrefValueMap(); |
| 179 | 177 |
| 180 NotificationRegistrar registrar_; | 178 NotificationRegistrar registrar_; |
| 181 PrefChangeRegistrar pref_change_registrar_; | 179 PrefChangeRegistrar pref_change_registrar_; |
| 182 | 180 |
| 183 FilePath path_; | 181 FilePath path_; |
| 184 FilePath base_cache_path_; | 182 FilePath base_cache_path_; |
| 185 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; | 183 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; |
| 186 // Keep |prefs_| on top for destruction order because |extension_prefs_|, | 184 // Keep |prefs_| on top for destruction order because |extension_prefs_|, |
| 187 // |net_pref_observer_|, |web_resource_service_|, | 185 // |net_pref_observer_|, |web_resource_service_|, and |io_data_| store |
| 188 // |background_contents_service_| and |io_data_| store pointers to |prefs_| | 186 // pointers to |prefs_| and shall be destructed first. |
| 189 // and shall be destructed first. | |
| 190 scoped_ptr<PrefService> prefs_; | 187 scoped_ptr<PrefService> prefs_; |
| 191 scoped_ptr<PrefService> otr_prefs_; | 188 scoped_ptr<PrefService> otr_prefs_; |
| 192 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; | 189 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; |
| 193 scoped_ptr<VisitedLinkMaster> visited_link_master_; | 190 scoped_ptr<VisitedLinkMaster> visited_link_master_; |
| 194 // Keep extension_prefs_ on top of extensions_service_ because the latter | 191 // Keep extension_prefs_ on top of extensions_service_ because the latter |
| 195 // maintains a pointer to the first and shall be destructed first. | 192 // maintains a pointer to the first and shall be destructed first. |
| 196 scoped_ptr<ExtensionPrefs> extension_prefs_; | 193 scoped_ptr<ExtensionPrefs> extension_prefs_; |
| 197 scoped_refptr<ExtensionService> extensions_service_; | 194 scoped_refptr<ExtensionService> extensions_service_; |
| 198 scoped_refptr<UserScriptMaster> user_script_master_; | 195 scoped_refptr<UserScriptMaster> user_script_master_; |
| 199 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; | 196 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; | 232 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; |
| 236 scoped_ptr<FindBarState> find_bar_state_; | 233 scoped_ptr<FindBarState> find_bar_state_; |
| 237 scoped_refptr<DownloadManager> download_manager_; | 234 scoped_refptr<DownloadManager> download_manager_; |
| 238 scoped_refptr<HistoryService> history_service_; | 235 scoped_refptr<HistoryService> history_service_; |
| 239 scoped_refptr<FaviconService> favicon_service_; | 236 scoped_refptr<FaviconService> favicon_service_; |
| 240 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 237 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; |
| 241 scoped_refptr<WebDataService> web_data_service_; | 238 scoped_refptr<WebDataService> web_data_service_; |
| 242 scoped_refptr<PasswordStore> password_store_; | 239 scoped_refptr<PasswordStore> password_store_; |
| 243 scoped_refptr<SessionService> session_service_; | 240 scoped_refptr<SessionService> session_service_; |
| 244 scoped_refptr<WebKitContext> webkit_context_; | 241 scoped_refptr<WebKitContext> webkit_context_; |
| 245 scoped_ptr<BackgroundContentsService> background_contents_service_; | |
| 246 scoped_ptr<BackgroundModeManager> background_mode_manager_; | |
| 247 scoped_ptr<StatusTray> status_tray_; | 242 scoped_ptr<StatusTray> status_tray_; |
| 248 scoped_refptr<PersonalDataManager> personal_data_manager_; | 243 scoped_refptr<PersonalDataManager> personal_data_manager_; |
| 249 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 244 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 250 scoped_ptr<BrowserSignin> browser_signin_; | 245 scoped_ptr<BrowserSignin> browser_signin_; |
| 251 bool history_service_created_; | 246 bool history_service_created_; |
| 252 bool favicon_service_created_; | 247 bool favicon_service_created_; |
| 253 bool created_web_data_service_; | 248 bool created_web_data_service_; |
| 254 bool created_password_store_; | 249 bool created_password_store_; |
| 255 bool created_download_manager_; | 250 bool created_download_manager_; |
| 256 bool clear_local_state_on_exit_; | 251 bool clear_local_state_on_exit_; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 #endif | 300 #endif |
| 306 | 301 |
| 307 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 302 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 308 | 303 |
| 309 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; | 304 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; |
| 310 | 305 |
| 311 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 306 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 312 }; | 307 }; |
| 313 | 308 |
| 314 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 309 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |