| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 void CreateTemplateURLService(); | 121 void CreateTemplateURLService(); |
| 122 | 122 |
| 123 // Blocks until TempalteURLService finishes loading. | 123 // Blocks until TempalteURLService finishes loading. |
| 124 void BlockUntilTemplateURLServiceLoaded(); | 124 void BlockUntilTemplateURLServiceLoaded(); |
| 125 | 125 |
| 126 TestingPrefService* GetTestingPrefService(); | 126 TestingPrefService* GetTestingPrefService(); |
| 127 | 127 |
| 128 // content::BrowserContext | 128 // content::BrowserContext |
| 129 virtual FilePath GetPath() OVERRIDE; | 129 virtual FilePath GetPath() OVERRIDE; |
| 130 virtual bool IsOffTheRecord() const OVERRIDE; | 130 virtual bool IsOffTheRecord() const OVERRIDE; |
| 131 virtual content::DownloadManager* GetDownloadManager() OVERRIDE; | 131 virtual content::DownloadManagerDelegate* |
| 132 GetDownloadManagerDelegate() OVERRIDE; |
| 132 // Returns a testing ContextGetter (if one has been created via | 133 // Returns a testing ContextGetter (if one has been created via |
| 133 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: | 134 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: |
| 134 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because | 135 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because |
| 135 // of the special memory management considerations for the | 136 // of the special memory management considerations for the |
| 136 // TestURLRequestContextGetter class, many tests would find themseleves | 137 // TestURLRequestContextGetter class, many tests would find themseleves |
| 137 // leaking if they called this method without the necessary IO thread. This | 138 // leaking if they called this method without the necessary IO thread. This |
| 138 // getter is currently only capable of returning a Context that helps test | 139 // getter is currently only capable of returning a Context that helps test |
| 139 // the CookieMonster. See implementation comments for more details. | 140 // the CookieMonster. See implementation comments for more details. |
| 140 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 141 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
| 141 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 142 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 // testing. | 330 // testing. |
| 330 ProfileDependencyManager* profile_dependency_manager_; | 331 ProfileDependencyManager* profile_dependency_manager_; |
| 331 | 332 |
| 332 scoped_ptr<content::MockResourceContext> resource_context_; | 333 scoped_ptr<content::MockResourceContext> resource_context_; |
| 333 | 334 |
| 334 // Weak pointer to a delegate for indicating that a profile was created. | 335 // Weak pointer to a delegate for indicating that a profile was created. |
| 335 Delegate* delegate_; | 336 Delegate* delegate_; |
| 336 }; | 337 }; |
| 337 | 338 |
| 338 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 339 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |