| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 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::UnsafeGetMessageLoopForThread(BrowserThread::IO), | 99 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| 100 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), | 100 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 101 protocol_handlers, std::move(request_interceptors), net_log()); | 101 protocol_handlers, std::move(request_interceptors), net_log()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 DownloadManagerDelegate* | 104 DownloadManagerDelegate* |
| 105 LayoutTestBrowserContext::GetDownloadManagerDelegate() { | 105 LayoutTestBrowserContext::GetDownloadManagerDelegate() { |
| 106 if (!download_manager_delegate_) { | 106 if (!download_manager_delegate_) { |
| 107 download_manager_delegate_.reset(new LayoutTestDownloadManagerDelegate()); | 107 download_manager_delegate_.reset(new LayoutTestDownloadManagerDelegate()); |
| 108 download_manager_delegate_->SetDownloadManager( | 108 download_manager_delegate_->SetDownloadManager( |
| 109 BrowserContext::GetDownloadManager(this)); | 109 BrowserContext::GetDownloadManager(this)); |
| 110 download_manager_delegate_->SetDownloadBehaviorForTesting( | 110 download_manager_delegate_->SetDownloadBehaviorForTesting( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 132 background_sync_controller_.reset(new MockBackgroundSyncController()); | 132 background_sync_controller_.reset(new MockBackgroundSyncController()); |
| 133 return background_sync_controller_.get(); | 133 return background_sync_controller_.get(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 LayoutTestPermissionManager* | 136 LayoutTestPermissionManager* |
| 137 LayoutTestBrowserContext::GetLayoutTestPermissionManager() { | 137 LayoutTestBrowserContext::GetLayoutTestPermissionManager() { |
| 138 return static_cast<LayoutTestPermissionManager*>(GetPermissionManager()); | 138 return static_cast<LayoutTestPermissionManager*>(GetPermissionManager()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace content | 141 } // namespace content |
| OLD | NEW |