| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_PROFILE_H__ | 7 #ifndef CHROME_BROWSER_PROFILE_H__ |
| 8 #define CHROME_BROWSER_PROFILE_H__ | 8 #define CHROME_BROWSER_PROFILE_H__ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
| 15 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
| 16 #include "base/task.h" | 16 #include "base/task.h" |
| 17 #include "base/timer.h" | 17 #include "base/timer.h" |
| 18 #ifdef CHROME_PERSONALIZATION | 18 #ifdef CHROME_PERSONALIZATION |
| 19 #include "chrome/personalization/personalization.h" | 19 #include "chrome/personalization/personalization.h" |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 class BookmarkBarModel; | 22 class BookmarkModel; |
| 23 class DownloadManager; | 23 class DownloadManager; |
| 24 class HistoryService; | 24 class HistoryService; |
| 25 class NavigationController; | 25 class NavigationController; |
| 26 class PrefService; | 26 class PrefService; |
| 27 class SessionService; | 27 class SessionService; |
| 28 class SpellChecker; | 28 class SpellChecker; |
| 29 class TabRestoreService; | 29 class TabRestoreService; |
| 30 class TemplateURLFetcher; | 30 class TemplateURLFetcher; |
| 31 class TemplateURLModel; | 31 class TemplateURLModel; |
| 32 class URLRequestContext; | 32 class URLRequestContext; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 virtual void UnregisterNavigationController( | 175 virtual void UnregisterNavigationController( |
| 176 NavigationController* controller) = 0; | 176 NavigationController* controller) = 0; |
| 177 | 177 |
| 178 // Return the registered navigation controllers. | 178 // Return the registered navigation controllers. |
| 179 typedef std::set<NavigationController*> ProfileControllerSet; | 179 typedef std::set<NavigationController*> ProfileControllerSet; |
| 180 virtual const ProfileControllerSet& GetNavigationControllers() = 0; | 180 virtual const ProfileControllerSet& GetNavigationControllers() = 0; |
| 181 | 181 |
| 182 // Returns true if the last time this profile was open it was exited cleanly. | 182 // Returns true if the last time this profile was open it was exited cleanly. |
| 183 virtual bool DidLastSessionExitCleanly() = 0; | 183 virtual bool DidLastSessionExitCleanly() = 0; |
| 184 | 184 |
| 185 // Returns true if the BookmarkBarMOdel has been created. | 185 // Returns the BookmarkModel, creating if not yet created. |
| 186 virtual bool HasBookmarkBarModel() = 0; | 186 virtual BookmarkModel* GetBookmarkModel() = 0; |
| 187 | |
| 188 // Returns the BookmarkBarModel, creating if not yet created. | |
| 189 virtual BookmarkBarModel* GetBookmarkBarModel() = 0; | |
| 190 | 187 |
| 191 #ifdef CHROME_PERSONALIZATION | 188 #ifdef CHROME_PERSONALIZATION |
| 192 virtual ProfilePersonalization GetProfilePersonalization() = 0; | 189 virtual ProfilePersonalization GetProfilePersonalization() = 0; |
| 193 #endif | 190 #endif |
| 194 | 191 |
| 195 // Return whether 2 profiles are the same. 2 profiles are the same if they | 192 // Return whether 2 profiles are the same. 2 profiles are the same if they |
| 196 // represent the same profile. This can happen if there is pointer equality | 193 // represent the same profile. This can happen if there is pointer equality |
| 197 // or if one profile is the off the record version of another profile (or vice | 194 // or if one profile is the off the record version of another profile (or vice |
| 198 // versa). | 195 // versa). |
| 199 virtual bool IsSameProfile(Profile* profile) = 0; | 196 virtual bool IsSameProfile(Profile* profile) = 0; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 virtual void ShutdownSessionService(); | 253 virtual void ShutdownSessionService(); |
| 257 virtual bool HasSessionService() const; | 254 virtual bool HasSessionService() const; |
| 258 virtual std::wstring GetName(); | 255 virtual std::wstring GetName(); |
| 259 virtual void SetName(const std::wstring& name); | 256 virtual void SetName(const std::wstring& name); |
| 260 virtual std::wstring GetID(); | 257 virtual std::wstring GetID(); |
| 261 virtual void SetID(const std::wstring& id); | 258 virtual void SetID(const std::wstring& id); |
| 262 virtual void RegisterNavigationController(NavigationController* controller); | 259 virtual void RegisterNavigationController(NavigationController* controller); |
| 263 virtual void UnregisterNavigationController(NavigationController* controller); | 260 virtual void UnregisterNavigationController(NavigationController* controller); |
| 264 virtual const Profile::ProfileControllerSet& GetNavigationControllers(); | 261 virtual const Profile::ProfileControllerSet& GetNavigationControllers(); |
| 265 virtual bool DidLastSessionExitCleanly(); | 262 virtual bool DidLastSessionExitCleanly(); |
| 266 virtual bool HasBookmarkBarModel(); | 263 virtual BookmarkModel* GetBookmarkModel(); |
| 267 virtual BookmarkBarModel* GetBookmarkBarModel(); | |
| 268 virtual bool IsSameProfile(Profile* profile); | 264 virtual bool IsSameProfile(Profile* profile); |
| 269 virtual Time GetStartTime() const; | 265 virtual Time GetStartTime() const; |
| 270 virtual TabRestoreService* GetTabRestoreService(); | 266 virtual TabRestoreService* GetTabRestoreService(); |
| 271 virtual void ResetTabRestoreService(); | 267 virtual void ResetTabRestoreService(); |
| 272 virtual SpellChecker* GetSpellChecker(); | 268 virtual SpellChecker* GetSpellChecker(); |
| 273 virtual void MarkAsCleanShutdown(); | 269 virtual void MarkAsCleanShutdown(); |
| 274 #ifdef CHROME_PERSONALIZATION | 270 #ifdef CHROME_PERSONALIZATION |
| 275 virtual ProfilePersonalization GetProfilePersonalization(); | 271 virtual ProfilePersonalization GetProfilePersonalization(); |
| 276 #endif | 272 #endif |
| 277 | 273 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 290 void EnsureSessionServiceCreated() { | 286 void EnsureSessionServiceCreated() { |
| 291 GetSessionService(); | 287 GetSessionService(); |
| 292 } | 288 } |
| 293 | 289 |
| 294 std::wstring path_; | 290 std::wstring path_; |
| 295 bool off_the_record_; | 291 bool off_the_record_; |
| 296 scoped_ptr<VisitedLinkMaster> visited_link_master_; | 292 scoped_ptr<VisitedLinkMaster> visited_link_master_; |
| 297 scoped_ptr<PrefService> prefs_; | 293 scoped_ptr<PrefService> prefs_; |
| 298 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; | 294 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; |
| 299 scoped_ptr<TemplateURLModel> template_url_model_; | 295 scoped_ptr<TemplateURLModel> template_url_model_; |
| 300 scoped_ptr<BookmarkBarModel> bookmark_bar_model_; | 296 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
| 301 | 297 |
| 302 #ifdef CHROME_PERSONALIZATION | 298 #ifdef CHROME_PERSONALIZATION |
| 303 ProfilePersonalization personalization_; | 299 ProfilePersonalization personalization_; |
| 304 #endif | 300 #endif |
| 305 | 301 |
| 306 RequestContext* request_context_; | 302 RequestContext* request_context_; |
| 307 | 303 |
| 308 scoped_refptr<DownloadManager> download_manager_; | 304 scoped_refptr<DownloadManager> download_manager_; |
| 309 scoped_refptr<HistoryService> history_service_; | 305 scoped_refptr<HistoryService> history_service_; |
| 310 scoped_refptr<WebDataService> web_data_service_; | 306 scoped_refptr<WebDataService> web_data_service_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 332 | 328 |
| 333 // Set to true when ShutdownSessionService is invoked. If true | 329 // Set to true when ShutdownSessionService is invoked. If true |
| 334 // GetSessionService won't recreate the SessionService. | 330 // GetSessionService won't recreate the SessionService. |
| 335 bool shutdown_session_service_; | 331 bool shutdown_session_service_; |
| 336 | 332 |
| 337 DISALLOW_EVIL_CONSTRUCTORS(ProfileImpl); | 333 DISALLOW_EVIL_CONSTRUCTORS(ProfileImpl); |
| 338 }; | 334 }; |
| 339 | 335 |
| 340 #endif // CHROME_BROWSER_PROFILE_H__ | 336 #endif // CHROME_BROWSER_PROFILE_H__ |
| 341 | 337 |
| OLD | NEW |