Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/test/testing_profile.h

Issue 6292017: Extended: Add "system" URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 virtual ExtensionInfoMap* GetExtensionInfoMap(); 277 virtual ExtensionInfoMap* GetExtensionInfoMap();
276 virtual PromoCounter* GetInstantPromoCounter(); 278 virtual PromoCounter* GetInstantPromoCounter();
277 virtual policy::ProfilePolicyContext* GetPolicyContext(); 279 virtual policy::ProfilePolicyContext* GetPolicyContext();
278 virtual ChromeURLDataManager* GetChromeURLDataManager(); 280 virtual ChromeURLDataManager* GetChromeURLDataManager();
279 virtual prerender::PrerenderManager* GetPrerenderManager(); 281 virtual prerender::PrerenderManager* GetPrerenderManager();
280 virtual PrefService* GetOffTheRecordPrefs(); 282 virtual PrefService* GetOffTheRecordPrefs();
281 283
282 protected: 284 protected:
283 base::Time start_time_; 285 base::Time start_time_;
284 scoped_ptr<PrefService> prefs_; 286 scoped_ptr<PrefService> prefs_;
287 scoped_ptr<PrefService> local_state_;
285 // ref only for right type, lifecycle is managed by prefs_ 288 // ref only for right type, lifecycle is managed by prefs_
286 TestingPrefService* testing_prefs_; 289 TestingPrefService* testing_prefs_;
287 290
288 private: 291 private:
289 // Destroys favicon service if it has been created. 292 // Destroys favicon service if it has been created.
290 void DestroyFaviconService(); 293 void DestroyFaviconService();
291 294
292 // If the webdata service has been created, it is destroyed. This is invoked 295 // If the webdata service has been created, it is destroyed. This is invoked
293 // from the destructor. 296 // from the destructor.
294 void DestroyWebDataService(); 297 void DestroyWebDataService();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 explicit DerivedTestingProfile(Profile* profile); 399 explicit DerivedTestingProfile(Profile* profile);
397 virtual ~DerivedTestingProfile(); 400 virtual ~DerivedTestingProfile();
398 401
399 virtual ProfileId GetRuntimeId(); 402 virtual ProfileId GetRuntimeId();
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698