| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 virtual ExtensionInfoMap* GetExtensionInfoMap(); | 275 virtual ExtensionInfoMap* GetExtensionInfoMap(); |
| 274 virtual PromoCounter* GetInstantPromoCounter(); | 276 virtual PromoCounter* GetInstantPromoCounter(); |
| 275 virtual policy::ProfilePolicyContext* GetPolicyContext(); | 277 virtual policy::ProfilePolicyContext* GetPolicyContext(); |
| 276 virtual ChromeURLDataManager* GetChromeURLDataManager(); | 278 virtual ChromeURLDataManager* GetChromeURLDataManager(); |
| 277 virtual PrerenderManager* GetPrerenderManager(); | 279 virtual PrerenderManager* GetPrerenderManager(); |
| 278 virtual PrefService* GetOffTheRecordPrefs(); | 280 virtual PrefService* GetOffTheRecordPrefs(); |
| 279 | 281 |
| 280 protected: | 282 protected: |
| 281 base::Time start_time_; | 283 base::Time start_time_; |
| 282 scoped_ptr<PrefService> prefs_; | 284 scoped_ptr<PrefService> prefs_; |
| 285 scoped_ptr<PrefService> local_state_; |
| 283 // ref only for right type, lifecycle is managed by prefs_ | 286 // ref only for right type, lifecycle is managed by prefs_ |
| 284 TestingPrefService* testing_prefs_; | 287 TestingPrefService* testing_prefs_; |
| 285 | 288 |
| 286 private: | 289 private: |
| 287 // Destroys favicon service if it has been created. | 290 // Destroys favicon service if it has been created. |
| 288 void DestroyFaviconService(); | 291 void DestroyFaviconService(); |
| 289 | 292 |
| 290 // If the webdata service has been created, it is destroyed. This is invoked | 293 // If the webdata service has been created, it is destroyed. This is invoked |
| 291 // from the destructor. | 294 // from the destructor. |
| 292 void DestroyWebDataService(); | 295 void DestroyWebDataService(); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 399 |
| 397 virtual ProfileId GetRuntimeId() { | 400 virtual ProfileId GetRuntimeId() { |
| 398 return original_profile_->GetRuntimeId(); | 401 return original_profile_->GetRuntimeId(); |
| 399 } | 402 } |
| 400 | 403 |
| 401 protected: | 404 protected: |
| 402 Profile* original_profile_; | 405 Profile* original_profile_; |
| 403 }; | 406 }; |
| 404 | 407 |
| 405 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 408 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
| OLD | NEW |