| 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 #include "content/public/test/test_browser_context.h" | 5 #include "content/public/test/test_browser_context.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/test/null_task_runner.h" | 10 #include "base/test/null_task_runner.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return permission_manager_.get(); | 120 return permission_manager_.get(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 BackgroundSyncController* TestBrowserContext::GetBackgroundSyncController() { | 123 BackgroundSyncController* TestBrowserContext::GetBackgroundSyncController() { |
| 124 if (!background_sync_controller_) | 124 if (!background_sync_controller_) |
| 125 background_sync_controller_.reset(new MockBackgroundSyncController()); | 125 background_sync_controller_.reset(new MockBackgroundSyncController()); |
| 126 | 126 |
| 127 return background_sync_controller_.get(); | 127 return background_sync_controller_.get(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 BrowsingDataRemoverDelegate* |
| 131 TestBrowserContext::GetBrowsingDataRemoverDelegate() { |
| 132 // Most BrowsingDataRemover tests do not require a delegate |
| 133 // (not even a mock one). |
| 134 return nullptr; |
| 135 } |
| 136 |
| 130 net::URLRequestContextGetter* TestBrowserContext::CreateRequestContext( | 137 net::URLRequestContextGetter* TestBrowserContext::CreateRequestContext( |
| 131 content::ProtocolHandlerMap* protocol_handlers, | 138 content::ProtocolHandlerMap* protocol_handlers, |
| 132 content::URLRequestInterceptorScopedVector request_interceptors) { | 139 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 133 return GetRequestContext(); | 140 return GetRequestContext(); |
| 134 } | 141 } |
| 135 | 142 |
| 136 net::URLRequestContextGetter* | 143 net::URLRequestContextGetter* |
| 137 TestBrowserContext::CreateRequestContextForStoragePartition( | 144 TestBrowserContext::CreateRequestContextForStoragePartition( |
| 138 const base::FilePath& partition_path, | 145 const base::FilePath& partition_path, |
| 139 bool in_memory, | 146 bool in_memory, |
| 140 ProtocolHandlerMap* protocol_handlers, | 147 ProtocolHandlerMap* protocol_handlers, |
| 141 URLRequestInterceptorScopedVector request_interceptors) { | 148 URLRequestInterceptorScopedVector request_interceptors) { |
| 142 return nullptr; | 149 return nullptr; |
| 143 } | 150 } |
| 144 | 151 |
| 145 net::URLRequestContextGetter* TestBrowserContext::CreateMediaRequestContext() { | 152 net::URLRequestContextGetter* TestBrowserContext::CreateMediaRequestContext() { |
| 146 return NULL; | 153 return NULL; |
| 147 } | 154 } |
| 148 | 155 |
| 149 net::URLRequestContextGetter* | 156 net::URLRequestContextGetter* |
| 150 TestBrowserContext::CreateMediaRequestContextForStoragePartition( | 157 TestBrowserContext::CreateMediaRequestContextForStoragePartition( |
| 151 const base::FilePath& partition_path, | 158 const base::FilePath& partition_path, |
| 152 bool in_memory) { | 159 bool in_memory) { |
| 153 return NULL; | 160 return NULL; |
| 154 } | 161 } |
| 155 | 162 |
| 156 } // namespace content | 163 } // namespace content |
| OLD | NEW |