OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |