| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 class ThemeProvider; | 68 class ThemeProvider; |
| 69 class ThumbnailStore; | 69 class ThumbnailStore; |
| 70 class URLRequestContextGetter; | 70 class URLRequestContextGetter; |
| 71 class UserScriptMaster; | 71 class UserScriptMaster; |
| 72 class UserStyleSheetWatcher; | 72 class UserStyleSheetWatcher; |
| 73 class VisitedLinkMaster; | 73 class VisitedLinkMaster; |
| 74 class VisitedLinkEventListener; | 74 class VisitedLinkEventListener; |
| 75 class WebDataService; | 75 class WebDataService; |
| 76 class WebKitContext; | 76 class WebKitContext; |
| 77 class WebResourceService; | 77 class WebResourceService; |
| 78 class CloudPrintProxyService; |
| 78 | 79 |
| 79 typedef intptr_t ProfileId; | 80 typedef intptr_t ProfileId; |
| 80 | 81 |
| 81 class Profile { | 82 class Profile { |
| 82 public: | 83 public: |
| 83 // Profile services are accessed with the following parameter. This parameter | 84 // Profile services are accessed with the following parameter. This parameter |
| 84 // defines what the caller plans to do with the service. | 85 // defines what the caller plans to do with the service. |
| 85 // The caller is responsible for not performing any operation that would | 86 // The caller is responsible for not performing any operation that would |
| 86 // result in persistent implicit records while using an OffTheRecord profile. | 87 // result in persistent implicit records while using an OffTheRecord profile. |
| 87 // This flag allows the profile to perform an additional check. | 88 // This flag allows the profile to perform an additional check. |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 345 |
| 345 // Returns true if the last time this profile was open it was exited cleanly. | 346 // Returns true if the last time this profile was open it was exited cleanly. |
| 346 virtual bool DidLastSessionExitCleanly() = 0; | 347 virtual bool DidLastSessionExitCleanly() = 0; |
| 347 | 348 |
| 348 // Returns the BookmarkModel, creating if not yet created. | 349 // Returns the BookmarkModel, creating if not yet created. |
| 349 virtual BookmarkModel* GetBookmarkModel() = 0; | 350 virtual BookmarkModel* GetBookmarkModel() = 0; |
| 350 | 351 |
| 351 // Returns the ProfileSyncService, creating if not yet created. | 352 // Returns the ProfileSyncService, creating if not yet created. |
| 352 virtual ProfileSyncService* GetProfileSyncService() = 0; | 353 virtual ProfileSyncService* GetProfileSyncService() = 0; |
| 353 | 354 |
| 355 // Returns the CloudPrintProxyService, creating if not yet created. |
| 356 virtual CloudPrintProxyService* GetCloudPrintProxyService() = 0; |
| 357 |
| 354 // Return whether 2 profiles are the same. 2 profiles are the same if they | 358 // Return whether 2 profiles are the same. 2 profiles are the same if they |
| 355 // represent the same profile. This can happen if there is pointer equality | 359 // represent the same profile. This can happen if there is pointer equality |
| 356 // or if one profile is the off the record version of another profile (or vice | 360 // or if one profile is the off the record version of another profile (or vice |
| 357 // versa). | 361 // versa). |
| 358 virtual bool IsSameProfile(Profile* profile) = 0; | 362 virtual bool IsSameProfile(Profile* profile) = 0; |
| 359 | 363 |
| 360 // Returns the time the profile was started. This is not the time the profile | 364 // Returns the time the profile was started. This is not the time the profile |
| 361 // was created, rather it is the time the user started chrome and logged into | 365 // was created, rather it is the time the user started chrome and logged into |
| 362 // this profile. For the single profile case, this corresponds to the time | 366 // this profile. For the single profile case, this corresponds to the time |
| 363 // the user started chrome. | 367 // the user started chrome. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 virtual SpellCheckHost* GetSpellCheckHost(); | 513 virtual SpellCheckHost* GetSpellCheckHost(); |
| 510 virtual void ReinitializeSpellCheckHost(bool force); | 514 virtual void ReinitializeSpellCheckHost(bool force); |
| 511 virtual WebKitContext* GetWebKitContext(); | 515 virtual WebKitContext* GetWebKitContext(); |
| 512 virtual DesktopNotificationService* GetDesktopNotificationService(); | 516 virtual DesktopNotificationService* GetDesktopNotificationService(); |
| 513 virtual void MarkAsCleanShutdown(); | 517 virtual void MarkAsCleanShutdown(); |
| 514 virtual void InitExtensions(); | 518 virtual void InitExtensions(); |
| 515 virtual void InitWebResources(); | 519 virtual void InitWebResources(); |
| 516 virtual NTPResourceCache* GetNTPResourceCache(); | 520 virtual NTPResourceCache* GetNTPResourceCache(); |
| 517 virtual ProfileSyncService* GetProfileSyncService(); | 521 virtual ProfileSyncService* GetProfileSyncService(); |
| 518 void InitSyncService(); | 522 void InitSyncService(); |
| 523 virtual CloudPrintProxyService* GetCloudPrintProxyService(); |
| 524 void InitCloudPrintProxyService(); |
| 519 | 525 |
| 520 // NotificationObserver implementation. | 526 // NotificationObserver implementation. |
| 521 virtual void Observe(NotificationType type, | 527 virtual void Observe(NotificationType type, |
| 522 const NotificationSource& source, | 528 const NotificationSource& source, |
| 523 const NotificationDetails& details); | 529 const NotificationDetails& details); |
| 524 | 530 |
| 525 // SpellCheckHostObserver implementation. | 531 // SpellCheckHostObserver implementation. |
| 526 virtual void SpellCheckHostInitialized(); | 532 virtual void SpellCheckHostInitialized(); |
| 527 | 533 |
| 528 private: | 534 private: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 scoped_ptr<PrefService> prefs_; | 570 scoped_ptr<PrefService> prefs_; |
| 565 scoped_refptr<ThumbnailStore> thumbnail_store_; | 571 scoped_refptr<ThumbnailStore> thumbnail_store_; |
| 566 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; | 572 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; |
| 567 scoped_ptr<TemplateURLModel> template_url_model_; | 573 scoped_ptr<TemplateURLModel> template_url_model_; |
| 568 scoped_ptr<BookmarkModel> bookmark_bar_model_; | 574 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
| 569 scoped_refptr<WebResourceService> web_resource_service_; | 575 scoped_refptr<WebResourceService> web_resource_service_; |
| 570 scoped_ptr<NTPResourceCache> ntp_resource_cache_; | 576 scoped_ptr<NTPResourceCache> ntp_resource_cache_; |
| 571 | 577 |
| 572 scoped_ptr<ProfileSyncFactory> profile_sync_factory_; | 578 scoped_ptr<ProfileSyncFactory> profile_sync_factory_; |
| 573 scoped_ptr<ProfileSyncService> sync_service_; | 579 scoped_ptr<ProfileSyncService> sync_service_; |
| 580 scoped_ptr<CloudPrintProxyService> cloud_print_proxy_service_; |
| 574 | 581 |
| 575 scoped_refptr<ChromeURLRequestContextGetter> request_context_; | 582 scoped_refptr<ChromeURLRequestContextGetter> request_context_; |
| 576 | 583 |
| 577 scoped_refptr<ChromeURLRequestContextGetter> media_request_context_; | 584 scoped_refptr<ChromeURLRequestContextGetter> media_request_context_; |
| 578 | 585 |
| 579 scoped_refptr<ChromeURLRequestContextGetter> extensions_request_context_; | 586 scoped_refptr<ChromeURLRequestContextGetter> extensions_request_context_; |
| 580 | 587 |
| 581 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; | 588 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; |
| 582 | 589 |
| 583 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 590 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; | 639 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; |
| 633 | 640 |
| 634 #if defined(OS_CHROMEOS) | 641 #if defined(OS_CHROMEOS) |
| 635 chromeos::Preferences chromeos_preferences_; | 642 chromeos::Preferences chromeos_preferences_; |
| 636 #endif | 643 #endif |
| 637 | 644 |
| 638 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 645 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 639 }; | 646 }; |
| 640 | 647 |
| 641 #endif // CHROME_BROWSER_PROFILE_H_ | 648 #endif // CHROME_BROWSER_PROFILE_H_ |
| OLD | NEW |