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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |