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

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

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 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
« no previous file with comments | « chrome/test/base/testing_pref_service.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BASE_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 net::CookieMonster* GetCookieMonster(); 230 net::CookieMonster* GetCookieMonster();
231 231
232 virtual policy::ManagedModePolicyProvider* 232 virtual policy::ManagedModePolicyProvider*
233 GetManagedModePolicyProvider() OVERRIDE; 233 GetManagedModePolicyProvider() OVERRIDE;
234 virtual policy::PolicyService* GetPolicyService() OVERRIDE; 234 virtual policy::PolicyService* GetPolicyService() OVERRIDE;
235 // Sets the profile's PrefService. If a pref service hasn't been explicitly 235 // Sets the profile's PrefService. If a pref service hasn't been explicitly
236 // set GetPrefs creates one, so normally you need not invoke this. If you need 236 // set GetPrefs creates one, so normally you need not invoke this. If you need
237 // to set a pref service you must invoke this before GetPrefs. 237 // to set a pref service you must invoke this before GetPrefs.
238 // TestingPrefService takes ownership of |prefs|. 238 // TestingPrefService takes ownership of |prefs|.
239 void SetPrefService(PrefServiceSyncable* prefs); 239 void SetPrefService(PrefServiceSyncable* prefs);
240 virtual PrefServiceSyncable* GetPrefs() OVERRIDE; 240 virtual PrefService* GetPrefs() OVERRIDE;
241 virtual history::TopSites* GetTopSites() OVERRIDE; 241 virtual history::TopSites* GetTopSites() OVERRIDE;
242 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; 242 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE;
243 243
244 void CreateRequestContext(); 244 void CreateRequestContext();
245 // Clears out the created request context (which must be done before shutting 245 // Clears out the created request context (which must be done before shutting
246 // down the IO thread to avoid leaks). 246 // down the IO thread to avoid leaks).
247 void ResetRequestContext(); 247 void ResetRequestContext();
248 248
249 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; 249 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
250 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 250 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // task is processed. This has the effect of blocking the caller until the 308 // task is processed. This has the effect of blocking the caller until the
309 // history service processes all pending requests. 309 // history service processes all pending requests.
310 void BlockUntilHistoryProcessesPendingRequests(); 310 void BlockUntilHistoryProcessesPendingRequests();
311 311
312 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; 312 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
313 virtual void ClearNetworkingHistorySince( 313 virtual void ClearNetworkingHistorySince(
314 base::Time time, 314 base::Time time,
315 const base::Closure& completion) OVERRIDE; 315 const base::Closure& completion) OVERRIDE;
316 virtual GURL GetHomePage() OVERRIDE; 316 virtual GURL GetHomePage() OVERRIDE;
317 317
318 virtual PrefServiceSyncable* GetOffTheRecordPrefs() OVERRIDE; 318 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE;
319 319
320 protected: 320 protected:
321 base::Time start_time_; 321 base::Time start_time_;
322 scoped_ptr<PrefServiceSyncable> prefs_; 322 scoped_ptr<PrefServiceSyncable> prefs_;
323 // ref only for right type, lifecycle is managed by prefs_ 323 // ref only for right type, lifecycle is managed by prefs_
324 TestingPrefServiceSyncable* testing_prefs_; 324 TestingPrefServiceSyncable* testing_prefs_;
325 325
326 private: 326 private:
327 // Creates a temporary directory for use by this profile. 327 // Creates a temporary directory for use by this profile.
328 void CreateTempProfileDir(); 328 void CreateTempProfileDir();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // testing. 376 // testing.
377 ProfileDependencyManager* profile_dependency_manager_; 377 ProfileDependencyManager* profile_dependency_manager_;
378 378
379 scoped_ptr<content::MockResourceContext> resource_context_; 379 scoped_ptr<content::MockResourceContext> resource_context_;
380 380
381 // Weak pointer to a delegate for indicating that a profile was created. 381 // Weak pointer to a delegate for indicating that a profile was created.
382 Delegate* delegate_; 382 Delegate* delegate_;
383 }; 383 };
384 384
385 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 385 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/test/base/testing_pref_service.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698