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

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: Add to PrefRegistrySyncable and PrefServiceSyncable to let sync know of pre-registered prefs. 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
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 net::CookieMonster* GetCookieMonster(); 219 net::CookieMonster* GetCookieMonster();
220 220
221 virtual policy::ManagedModePolicyProvider* 221 virtual policy::ManagedModePolicyProvider*
222 GetManagedModePolicyProvider() OVERRIDE; 222 GetManagedModePolicyProvider() OVERRIDE;
223 virtual policy::PolicyService* GetPolicyService() OVERRIDE; 223 virtual policy::PolicyService* GetPolicyService() OVERRIDE;
224 // Sets the profile's PrefService. If a pref service hasn't been explicitly 224 // Sets the profile's PrefService. If a pref service hasn't been explicitly
225 // set GetPrefs creates one, so normally you need not invoke this. If you need 225 // set GetPrefs creates one, so normally you need not invoke this. If you need
226 // to set a pref service you must invoke this before GetPrefs. 226 // to set a pref service you must invoke this before GetPrefs.
227 // TestingPrefService takes ownership of |prefs|. 227 // TestingPrefService takes ownership of |prefs|.
228 void SetPrefService(PrefServiceSyncable* prefs); 228 void SetPrefService(PrefServiceSyncable* prefs);
229 virtual PrefServiceSyncable* GetPrefs() OVERRIDE; 229 virtual PrefService* GetPrefs() OVERRIDE;
230 virtual history::TopSites* GetTopSites() OVERRIDE; 230 virtual history::TopSites* GetTopSites() OVERRIDE;
231 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; 231 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE;
232 232
233 void CreateRequestContext(); 233 void CreateRequestContext();
234 // Clears out the created request context (which must be done before shutting 234 // Clears out the created request context (which must be done before shutting
235 // down the IO thread to avoid leaks). 235 // down the IO thread to avoid leaks).
236 void ResetRequestContext(); 236 void ResetRequestContext();
237 237
238 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; 238 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
239 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 239 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // task is processed. This has the effect of blocking the caller until the 287 // task is processed. This has the effect of blocking the caller until the
288 // history service processes all pending requests. 288 // history service processes all pending requests.
289 void BlockUntilHistoryProcessesPendingRequests(); 289 void BlockUntilHistoryProcessesPendingRequests();
290 290
291 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; 291 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
292 virtual void ClearNetworkingHistorySince( 292 virtual void ClearNetworkingHistorySince(
293 base::Time time, 293 base::Time time,
294 const base::Closure& completion) OVERRIDE; 294 const base::Closure& completion) OVERRIDE;
295 virtual GURL GetHomePage() OVERRIDE; 295 virtual GURL GetHomePage() OVERRIDE;
296 296
297 virtual PrefServiceSyncable* GetOffTheRecordPrefs() OVERRIDE; 297 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE;
298 298
299 protected: 299 protected:
300 base::Time start_time_; 300 base::Time start_time_;
301 scoped_ptr<PrefServiceSyncable> prefs_; 301 scoped_ptr<PrefServiceSyncable> prefs_;
302 // ref only for right type, lifecycle is managed by prefs_ 302 // ref only for right type, lifecycle is managed by prefs_
303 TestingPrefServiceSyncable* testing_prefs_; 303 TestingPrefServiceSyncable* testing_prefs_;
304 304
305 private: 305 private:
306 // Creates a temporary directory for use by this profile. 306 // Creates a temporary directory for use by this profile.
307 void CreateTempProfileDir(); 307 void CreateTempProfileDir();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // testing. 355 // testing.
356 ProfileDependencyManager* profile_dependency_manager_; 356 ProfileDependencyManager* profile_dependency_manager_;
357 357
358 scoped_ptr<content::MockResourceContext> resource_context_; 358 scoped_ptr<content::MockResourceContext> resource_context_;
359 359
360 // Weak pointer to a delegate for indicating that a profile was created. 360 // Weak pointer to a delegate for indicating that a profile was created.
361 Delegate* delegate_; 361 Delegate* delegate_;
362 }; 362 };
363 363
364 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 364 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698