| 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/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 virtual AutocompleteClassifier* GetAutocompleteClassifier(); | 162 virtual AutocompleteClassifier* GetAutocompleteClassifier(); |
| 163 virtual WebDataService* GetWebDataService(ServiceAccessType access); | 163 virtual WebDataService* GetWebDataService(ServiceAccessType access); |
| 164 virtual WebDataService* GetWebDataServiceWithoutCreating(); | 164 virtual WebDataService* GetWebDataServiceWithoutCreating(); |
| 165 virtual PasswordStore* GetPasswordStore(ServiceAccessType access); | 165 virtual PasswordStore* GetPasswordStore(ServiceAccessType access); |
| 166 // Sets the profile's PrefService. If a pref service hasn't been explicitly | 166 // Sets the profile's PrefService. If a pref service hasn't been explicitly |
| 167 // set GetPrefs creates one, so normally you need not invoke this. If you need | 167 // set GetPrefs creates one, so normally you need not invoke this. If you need |
| 168 // to set a pref service you must invoke this before GetPrefs. | 168 // to set a pref service you must invoke this before GetPrefs. |
| 169 // TestingPrefService takes ownership of |prefs|. | 169 // TestingPrefService takes ownership of |prefs|. |
| 170 void SetPrefService(PrefService* prefs); | 170 void SetPrefService(PrefService* prefs); |
| 171 virtual PrefService* GetPrefs(); | 171 virtual PrefService* GetPrefs(); |
| 172 void SetLocalState(PrefService* local_state); |
| 173 virtual PrefService* GetLocalState(); |
| 172 virtual TemplateURLModel* GetTemplateURLModel(); | 174 virtual TemplateURLModel* GetTemplateURLModel(); |
| 173 virtual TemplateURLFetcher* GetTemplateURLFetcher(); | 175 virtual TemplateURLFetcher* GetTemplateURLFetcher(); |
| 174 virtual history::TopSites* GetTopSites(); | 176 virtual history::TopSites* GetTopSites(); |
| 175 virtual history::TopSites* GetTopSitesWithoutCreating(); | 177 virtual history::TopSites* GetTopSitesWithoutCreating(); |
| 176 virtual DownloadManager* GetDownloadManager(); | 178 virtual DownloadManager* GetDownloadManager(); |
| 177 virtual PersonalDataManager* GetPersonalDataManager(); | 179 virtual PersonalDataManager* GetPersonalDataManager(); |
| 178 virtual fileapi::FileSystemContext* GetFileSystemContext(); | 180 virtual fileapi::FileSystemContext* GetFileSystemContext(); |
| 179 virtual BrowserSignin* GetBrowserSignin(); | 181 virtual BrowserSignin* GetBrowserSignin(); |
| 180 virtual bool HasCreatedDownloadManager() const; | 182 virtual bool HasCreatedDownloadManager() const; |
| 181 virtual void InitThemes(); | 183 virtual void InitThemes(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 virtual void InitExtensions() {} | 241 virtual void InitExtensions() {} |
| 240 virtual void InitWebResources() {} | 242 virtual void InitWebResources() {} |
| 241 virtual NTPResourceCache* GetNTPResourceCache(); | 243 virtual NTPResourceCache* GetNTPResourceCache(); |
| 242 | 244 |
| 243 virtual DesktopNotificationService* GetDesktopNotificationService(); | 245 virtual DesktopNotificationService* GetDesktopNotificationService(); |
| 244 virtual BackgroundContentsService* GetBackgroundContentsService() const; | 246 virtual BackgroundContentsService* GetBackgroundContentsService() const; |
| 245 virtual StatusTray* GetStatusTray(); | 247 virtual StatusTray* GetStatusTray(); |
| 246 virtual FilePath last_selected_directory(); | 248 virtual FilePath last_selected_directory(); |
| 247 virtual void set_last_selected_directory(const FilePath& path); | 249 virtual void set_last_selected_directory(const FilePath& path); |
| 248 #if defined(OS_CHROMEOS) | 250 #if defined(OS_CHROMEOS) |
| 249 virtual chromeos::ProxyConfigServiceImpl* | |
| 250 GetChromeOSProxyConfigServiceImpl() { | |
| 251 return NULL; | |
| 252 } | |
| 253 virtual void SetupChromeOSEnterpriseExtensionObserver() { | 251 virtual void SetupChromeOSEnterpriseExtensionObserver() { |
| 254 } | 252 } |
| 255 virtual void InitChromeOSPreferences() { | 253 virtual void InitChromeOSPreferences() { |
| 256 } | 254 } |
| 257 virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) { | 255 virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) { |
| 258 } | 256 } |
| 259 #endif // defined(OS_CHROMEOS) | 257 #endif // defined(OS_CHROMEOS) |
| 260 | 258 |
| 261 virtual PrefProxyConfigTracker* GetProxyConfigTracker(); | 259 virtual PrefProxyConfigTracker* GetProxyConfigTracker(); |
| 262 | 260 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 275 virtual ExtensionInfoMap* GetExtensionInfoMap(); | 273 virtual ExtensionInfoMap* GetExtensionInfoMap(); |
| 276 virtual PromoCounter* GetInstantPromoCounter(); | 274 virtual PromoCounter* GetInstantPromoCounter(); |
| 277 virtual policy::ProfilePolicyContext* GetPolicyContext(); | 275 virtual policy::ProfilePolicyContext* GetPolicyContext(); |
| 278 virtual ChromeURLDataManager* GetChromeURLDataManager(); | 276 virtual ChromeURLDataManager* GetChromeURLDataManager(); |
| 279 virtual prerender::PrerenderManager* GetPrerenderManager(); | 277 virtual prerender::PrerenderManager* GetPrerenderManager(); |
| 280 virtual PrefService* GetOffTheRecordPrefs(); | 278 virtual PrefService* GetOffTheRecordPrefs(); |
| 281 | 279 |
| 282 protected: | 280 protected: |
| 283 base::Time start_time_; | 281 base::Time start_time_; |
| 284 scoped_ptr<PrefService> prefs_; | 282 scoped_ptr<PrefService> prefs_; |
| 283 scoped_ptr<PrefService> local_state_; |
| 285 // ref only for right type, lifecycle is managed by prefs_ | 284 // ref only for right type, lifecycle is managed by prefs_ |
| 286 TestingPrefService* testing_prefs_; | 285 TestingPrefService* testing_prefs_; |
| 287 | 286 |
| 288 private: | 287 private: |
| 289 // Destroys favicon service if it has been created. | 288 // Destroys favicon service if it has been created. |
| 290 void DestroyFaviconService(); | 289 void DestroyFaviconService(); |
| 291 | 290 |
| 292 // If the webdata service has been created, it is destroyed. This is invoked | 291 // If the webdata service has been created, it is destroyed. This is invoked |
| 293 // from the destructor. | 292 // from the destructor. |
| 294 void DestroyWebDataService(); | 293 void DestroyWebDataService(); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 explicit DerivedTestingProfile(Profile* profile); | 395 explicit DerivedTestingProfile(Profile* profile); |
| 397 virtual ~DerivedTestingProfile(); | 396 virtual ~DerivedTestingProfile(); |
| 398 | 397 |
| 399 virtual ProfileId GetRuntimeId(); | 398 virtual ProfileId GetRuntimeId(); |
| 400 | 399 |
| 401 protected: | 400 protected: |
| 402 Profile* original_profile_; | 401 Profile* original_profile_; |
| 403 }; | 402 }; |
| 404 | 403 |
| 405 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 404 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
| OLD | NEW |