| 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 #ifndef CHROME_TEST_TESTING_PROFILE_H_ | 5 #ifndef CHROME_TEST_TESTING_PROFILE_H_ |
| 6 #define CHROME_TEST_TESTING_PROFILE_H_ | 6 #define CHROME_TEST_TESTING_PROFILE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/scoped_temp_dir.h" | 11 #include "base/memory/scoped_temp_dir.h" |
| 12 #include "base/timer.h" | 12 #include "base/timer.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 | 14 |
| 15 namespace history { | 15 namespace history { |
| 16 class TopSites; | 16 class TopSites; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 class CookieMonster; | 20 class CookieMonster; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace quota { | 23 namespace quota { |
| 24 class SpecialStoragePolicy; | 24 class SpecialStoragePolicy; |
| 25 } | 25 } |
| 26 | 26 |
| 27 class AutocompleteClassifier; | 27 class AutocompleteClassifier; |
| 28 class BookmarkModel; | 28 class BookmarkModel; |
| 29 class CommandLine; | 29 class CommandLine; |
| 30 class DesktopNotificationService; |
| 30 class ExtensionPrefs; | 31 class ExtensionPrefs; |
| 31 class ExtensionPrefStore; | 32 class ExtensionPrefStore; |
| 32 class ExtensionPrefValueMap; | 33 class ExtensionPrefValueMap; |
| 33 class ExtensionSpecialStoragePolicy; | 34 class ExtensionSpecialStoragePolicy; |
| 34 class FaviconService; | 35 class FaviconService; |
| 35 class FindBarState; | 36 class FindBarState; |
| 36 class GeolocationContentSettingsMap; | 37 class GeolocationContentSettingsMap; |
| 37 class GeolocationPermissionContext; | 38 class GeolocationPermissionContext; |
| 38 class HistoryService; | 39 class HistoryService; |
| 39 class HostContentSettingsMap; | 40 class HostContentSettingsMap; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 123 |
| 123 // Creates an ExtensionService initialized with the testing profile and | 124 // Creates an ExtensionService initialized with the testing profile and |
| 124 // returns it. The profile keeps its own copy of a scoped_refptr to the | 125 // returns it. The profile keeps its own copy of a scoped_refptr to the |
| 125 // ExtensionService to make sure that is still alive to be notified when the | 126 // ExtensionService to make sure that is still alive to be notified when the |
| 126 // profile is destroyed. | 127 // profile is destroyed. |
| 127 ExtensionService* CreateExtensionService(const CommandLine* command_line, | 128 ExtensionService* CreateExtensionService(const CommandLine* command_line, |
| 128 const FilePath& install_directory); | 129 const FilePath& install_directory); |
| 129 | 130 |
| 130 TestingPrefService* GetTestingPrefService(); | 131 TestingPrefService* GetTestingPrefService(); |
| 131 | 132 |
| 133 void SetProfileDependencyManager(ProfileDependencyManager* manager); |
| 134 |
| 132 virtual ProfileId GetRuntimeId(); | 135 virtual ProfileId GetRuntimeId(); |
| 133 | 136 |
| 134 virtual FilePath GetPath(); | 137 virtual FilePath GetPath(); |
| 135 | 138 |
| 136 // Sets whether we're incognito. Default is false. | 139 // Sets whether we're incognito. Default is false. |
| 137 void set_incognito(bool incognito) { | 140 void set_incognito(bool incognito) { |
| 138 incognito_ = incognito; | 141 incognito_ = incognito; |
| 139 } | 142 } |
| 140 virtual bool IsOffTheRecord(); | 143 virtual bool IsOffTheRecord(); |
| 141 // Assumes ownership. | 144 // Assumes ownership. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 virtual SpellCheckHost* GetSpellCheckHost(); | 243 virtual SpellCheckHost* GetSpellCheckHost(); |
| 241 virtual void ReinitializeSpellCheckHost(bool force) { } | 244 virtual void ReinitializeSpellCheckHost(bool force) { } |
| 242 virtual WebKitContext* GetWebKitContext(); | 245 virtual WebKitContext* GetWebKitContext(); |
| 243 virtual WebKitContext* GetOffTheRecordWebKitContext(); | 246 virtual WebKitContext* GetOffTheRecordWebKitContext(); |
| 244 virtual void MarkAsCleanShutdown() {} | 247 virtual void MarkAsCleanShutdown() {} |
| 245 virtual void InitExtensions() {} | 248 virtual void InitExtensions() {} |
| 246 virtual void InitPromoResources() {} | 249 virtual void InitPromoResources() {} |
| 247 virtual void InitRegisteredProtocolHandlers() {} | 250 virtual void InitRegisteredProtocolHandlers() {} |
| 248 virtual NTPResourceCache* GetNTPResourceCache(); | 251 virtual NTPResourceCache* GetNTPResourceCache(); |
| 249 | 252 |
| 253 virtual DesktopNotificationService* GetDesktopNotificationService(); |
| 250 virtual BackgroundContentsService* GetBackgroundContentsService() const; | 254 virtual BackgroundContentsService* GetBackgroundContentsService() const; |
| 251 virtual StatusTray* GetStatusTray(); | 255 virtual StatusTray* GetStatusTray(); |
| 252 virtual FilePath last_selected_directory(); | 256 virtual FilePath last_selected_directory(); |
| 253 virtual void set_last_selected_directory(const FilePath& path); | 257 virtual void set_last_selected_directory(const FilePath& path); |
| 254 #if defined(OS_CHROMEOS) | 258 #if defined(OS_CHROMEOS) |
| 255 virtual void SetupChromeOSEnterpriseExtensionObserver() { | 259 virtual void SetupChromeOSEnterpriseExtensionObserver() { |
| 256 } | 260 } |
| 257 virtual void InitChromeOSPreferences() { | 261 virtual void InitChromeOSPreferences() { |
| 258 } | 262 } |
| 259 virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) { | 263 virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // Should be used only on the file thread. | 364 // Should be used only on the file thread. |
| 361 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; | 365 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; |
| 362 | 366 |
| 363 // WebKitContext, lazily initialized by GetWebKitContext(). | 367 // WebKitContext, lazily initialized by GetWebKitContext(). |
| 364 scoped_refptr<WebKitContext> webkit_context_; | 368 scoped_refptr<WebKitContext> webkit_context_; |
| 365 | 369 |
| 366 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 370 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 367 scoped_refptr<GeolocationContentSettingsMap> | 371 scoped_refptr<GeolocationContentSettingsMap> |
| 368 geolocation_content_settings_map_; | 372 geolocation_content_settings_map_; |
| 369 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_; | 373 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_; |
| 374 scoped_ptr<DesktopNotificationService> desktop_notification_service_; |
| 370 | 375 |
| 371 // Find bar state. Created lazily by GetFindBarState(). | 376 // Find bar state. Created lazily by GetFindBarState(). |
| 372 scoped_ptr<FindBarState> find_bar_state_; | 377 scoped_ptr<FindBarState> find_bar_state_; |
| 373 | 378 |
| 374 FilePath last_selected_directory_; | 379 FilePath last_selected_directory_; |
| 375 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. | 380 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. |
| 376 | 381 |
| 377 // The Extension Preferences. Only created if CreateExtensionService is | 382 // The Extension Preferences. Only created if CreateExtensionService is |
| 378 // invoked. | 383 // invoked. |
| 379 scoped_ptr<ExtensionPrefs> extension_prefs_; | 384 scoped_ptr<ExtensionPrefs> extension_prefs_; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 explicit DerivedTestingProfile(Profile* profile); | 416 explicit DerivedTestingProfile(Profile* profile); |
| 412 virtual ~DerivedTestingProfile(); | 417 virtual ~DerivedTestingProfile(); |
| 413 | 418 |
| 414 virtual ProfileId GetRuntimeId(); | 419 virtual ProfileId GetRuntimeId(); |
| 415 | 420 |
| 416 protected: | 421 protected: |
| 417 Profile* original_profile_; | 422 Profile* original_profile_; |
| 418 }; | 423 }; |
| 419 | 424 |
| 420 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 425 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
| OLD | NEW |