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

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: Continued 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::SandboxedFileSystemContext* GetFileSystemContext(); 180 virtual fileapi::SandboxedFileSystemContext* 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 virtual ChromeBlobStorageContext* GetBlobStorageContext(); 274 virtual ChromeBlobStorageContext* GetBlobStorageContext();
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 PrerenderManager* GetPrerenderManager(); 278 virtual PrerenderManager* GetPrerenderManager();
277 virtual PrefService* GetOffTheRecordPrefs(); 279 virtual PrefService* GetOffTheRecordPrefs();
278 280
279 protected: 281 protected:
280 base::Time start_time_; 282 base::Time start_time_;
281 scoped_ptr<PrefService> prefs_; 283 scoped_ptr<PrefService> prefs_;
284 scoped_ptr<PrefService> local_state_;
282 // ref only for right type, lifecycle is managed by prefs_ 285 // ref only for right type, lifecycle is managed by prefs_
283 TestingPrefService* testing_prefs_; 286 TestingPrefService* testing_prefs_;
284 287
285 private: 288 private:
286 // Destroys favicon service if it has been created. 289 // Destroys favicon service if it has been created.
287 void DestroyFaviconService(); 290 void DestroyFaviconService();
288 291
289 // If the webdata service has been created, it is destroyed. This is invoked 292 // If the webdata service has been created, it is destroyed. This is invoked
290 // from the destructor. 293 // from the destructor.
291 void DestroyWebDataService(); 294 void DestroyWebDataService();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 396
394 virtual ProfileId GetRuntimeId() { 397 virtual ProfileId GetRuntimeId() {
395 return original_profile_->GetRuntimeId(); 398 return original_profile_->GetRuntimeId();
396 } 399 }
397 400
398 protected: 401 protected:
399 Profile* original_profile_; 402 Profile* original_profile_;
400 }; 403 };
401 404
402 #endif // CHROME_TEST_TESTING_PROFILE_H_ 405 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698