| 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 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
| 22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "chrome/common/pref_service.h" | 23 #include "chrome/common/pref_service.h" |
| 24 | 24 |
| 25 class BookmarkModel; | 25 class BookmarkModel; |
| 26 class ChromeURLRequestContext; |
| 26 class DownloadManager; | 27 class DownloadManager; |
| 27 class ExtensionsService; | 28 class ExtensionsService; |
| 28 class GreasemonkeyMaster; | 29 class GreasemonkeyMaster; |
| 29 class HistoryService; | 30 class HistoryService; |
| 30 class NavigationController; | 31 class NavigationController; |
| 31 class PrefService; | 32 class PrefService; |
| 32 class SessionService; | 33 class SessionService; |
| 33 class SpellChecker; | 34 class SpellChecker; |
| 34 class TabRestoreService; | 35 class TabRestoreService; |
| 35 class TemplateURLFetcher; | 36 class TemplateURLFetcher; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 virtual void MarkAsCleanShutdown(); | 288 virtual void MarkAsCleanShutdown(); |
| 288 #ifdef CHROME_PERSONALIZATION | 289 #ifdef CHROME_PERSONALIZATION |
| 289 virtual ProfilePersonalization* GetProfilePersonalization(); | 290 virtual ProfilePersonalization* GetProfilePersonalization(); |
| 290 #endif | 291 #endif |
| 291 // NotificationObserver implementation. | 292 // NotificationObserver implementation. |
| 292 virtual void Observe(NotificationType type, | 293 virtual void Observe(NotificationType type, |
| 293 const NotificationSource& source, | 294 const NotificationSource& source, |
| 294 const NotificationDetails& details); | 295 const NotificationDetails& details); |
| 295 | 296 |
| 296 private: | 297 private: |
| 297 class RequestContext; | |
| 298 | |
| 299 friend class Profile; | 298 friend class Profile; |
| 300 | 299 |
| 301 explicit ProfileImpl(const std::wstring& path); | 300 explicit ProfileImpl(const std::wstring& path); |
| 302 | 301 |
| 303 void CreateWebDataService(); | 302 void CreateWebDataService(); |
| 304 std::wstring GetPrefFilePath(); | 303 std::wstring GetPrefFilePath(); |
| 305 | 304 |
| 306 void StopCreateSessionServiceTimer(); | 305 void StopCreateSessionServiceTimer(); |
| 307 | 306 |
| 308 void EnsureSessionServiceCreated() { | 307 void EnsureSessionServiceCreated() { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 325 scoped_refptr<GreasemonkeyMaster> greasemonkey_master_; | 324 scoped_refptr<GreasemonkeyMaster> greasemonkey_master_; |
| 326 scoped_ptr<PrefService> prefs_; | 325 scoped_ptr<PrefService> prefs_; |
| 327 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; | 326 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; |
| 328 scoped_ptr<TemplateURLModel> template_url_model_; | 327 scoped_ptr<TemplateURLModel> template_url_model_; |
| 329 scoped_ptr<BookmarkModel> bookmark_bar_model_; | 328 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
| 330 | 329 |
| 331 #ifdef CHROME_PERSONALIZATION | 330 #ifdef CHROME_PERSONALIZATION |
| 332 scoped_ptr<ProfilePersonalization> personalization_; | 331 scoped_ptr<ProfilePersonalization> personalization_; |
| 333 #endif | 332 #endif |
| 334 | 333 |
| 335 RequestContext* request_context_; | 334 ChromeURLRequestContext* request_context_; |
| 336 | 335 |
| 337 scoped_refptr<DownloadManager> download_manager_; | 336 scoped_refptr<DownloadManager> download_manager_; |
| 338 scoped_refptr<HistoryService> history_service_; | 337 scoped_refptr<HistoryService> history_service_; |
| 339 scoped_refptr<WebDataService> web_data_service_; | 338 scoped_refptr<WebDataService> web_data_service_; |
| 340 scoped_refptr<SessionService> session_service_; | 339 scoped_refptr<SessionService> session_service_; |
| 341 bool history_service_created_; | 340 bool history_service_created_; |
| 342 bool created_web_data_service_; | 341 bool created_web_data_service_; |
| 343 bool created_download_manager_; | 342 bool created_download_manager_; |
| 344 // Whether or not the last session exited cleanly. This is set only once. | 343 // Whether or not the last session exited cleanly. This is set only once. |
| 345 bool last_session_exited_cleanly_; | 344 bool last_session_exited_cleanly_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 366 | 365 |
| 367 // This struct is used to pass the spellchecker object through the notification | 366 // This struct is used to pass the spellchecker object through the notification |
| 368 // NOTIFY_SPELLCHECKER_REINITIALIZED. This is used as the details for the | 367 // NOTIFY_SPELLCHECKER_REINITIALIZED. This is used as the details for the |
| 369 // notification service. | 368 // notification service. |
| 370 struct SpellcheckerReinitializedDetails { | 369 struct SpellcheckerReinitializedDetails { |
| 371 scoped_refptr<SpellChecker> spellchecker; | 370 scoped_refptr<SpellChecker> spellchecker; |
| 372 }; | 371 }; |
| 373 | 372 |
| 374 #endif // CHROME_BROWSER_PROFILE_H__ | 373 #endif // CHROME_BROWSER_PROFILE_H__ |
| 375 | 374 |
| OLD | NEW |