OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/browser/layout_test/layout_test_browser_context.h" | 5 #include "content/shell/browser/layout_test/layout_test_browser_context.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 ShellURLRequestContextGetter* | 91 ShellURLRequestContextGetter* |
92 LayoutTestBrowserContext::CreateURLRequestContextGetter( | 92 LayoutTestBrowserContext::CreateURLRequestContextGetter( |
93 ProtocolHandlerMap* protocol_handlers, | 93 ProtocolHandlerMap* protocol_handlers, |
94 URLRequestInterceptorScopedVector request_interceptors) { | 94 URLRequestInterceptorScopedVector request_interceptors) { |
95 protocol_handlers->insert(std::make_pair( | 95 protocol_handlers->insert(std::make_pair( |
96 "layout-test-mojom", make_linked_ptr(new MojomProtocolHandler))); | 96 "layout-test-mojom", make_linked_ptr(new MojomProtocolHandler))); |
97 return new LayoutTestURLRequestContextGetter( | 97 return new LayoutTestURLRequestContextGetter( |
98 ignore_certificate_errors(), GetPath(), | 98 ignore_certificate_errors(), GetPath(), |
99 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), | 99 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
100 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | |
101 protocol_handlers, std::move(request_interceptors), net_log()); | 100 protocol_handlers, std::move(request_interceptors), net_log()); |
102 } | 101 } |
103 | 102 |
104 DownloadManagerDelegate* | 103 DownloadManagerDelegate* |
105 LayoutTestBrowserContext::GetDownloadManagerDelegate() { | 104 LayoutTestBrowserContext::GetDownloadManagerDelegate() { |
106 if (!download_manager_delegate_) { | 105 if (!download_manager_delegate_) { |
107 download_manager_delegate_.reset(new LayoutTestDownloadManagerDelegate()); | 106 download_manager_delegate_.reset(new LayoutTestDownloadManagerDelegate()); |
108 download_manager_delegate_->SetDownloadManager( | 107 download_manager_delegate_->SetDownloadManager( |
109 BrowserContext::GetDownloadManager(this)); | 108 BrowserContext::GetDownloadManager(this)); |
110 download_manager_delegate_->SetDownloadBehaviorForTesting( | 109 download_manager_delegate_->SetDownloadBehaviorForTesting( |
(...skipping 21 matching lines...) Expand all Loading... |
132 background_sync_controller_.reset(new MockBackgroundSyncController()); | 131 background_sync_controller_.reset(new MockBackgroundSyncController()); |
133 return background_sync_controller_.get(); | 132 return background_sync_controller_.get(); |
134 } | 133 } |
135 | 134 |
136 LayoutTestPermissionManager* | 135 LayoutTestPermissionManager* |
137 LayoutTestBrowserContext::GetLayoutTestPermissionManager() { | 136 LayoutTestBrowserContext::GetLayoutTestPermissionManager() { |
138 return static_cast<LayoutTestPermissionManager*>(GetPermissionManager()); | 137 return static_cast<LayoutTestPermissionManager*>(GetPermissionManager()); |
139 } | 138 } |
140 | 139 |
141 } // namespace content | 140 } // namespace content |
OLD | NEW |