Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: content/shell/browser/layout_test/layout_test_url_request_context_getter.cc

Issue 2946343003: Remove more instances of BrowserThread::FILE. (Closed)
Patch Set: this time with feeling Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_url_request_context_gett er.h" 5 #include "content/shell/browser/layout_test/layout_test_url_request_context_gett er.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "content/shell/browser/shell_network_delegate.h" 13 #include "content/shell/browser/shell_network_delegate.h"
14 #include "net/proxy/proxy_service.h" 14 #include "net/proxy/proxy_service.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 LayoutTestURLRequestContextGetter::LayoutTestURLRequestContextGetter( 18 LayoutTestURLRequestContextGetter::LayoutTestURLRequestContextGetter(
19 bool ignore_certificate_errors, 19 bool ignore_certificate_errors,
20 const base::FilePath& base_path, 20 const base::FilePath& base_path,
21 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 21 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
22 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
23 ProtocolHandlerMap* protocol_handlers, 22 ProtocolHandlerMap* protocol_handlers,
24 URLRequestInterceptorScopedVector request_interceptors, 23 URLRequestInterceptorScopedVector request_interceptors,
25 net::NetLog* net_log) 24 net::NetLog* net_log)
26 : ShellURLRequestContextGetter(ignore_certificate_errors, 25 : ShellURLRequestContextGetter(ignore_certificate_errors,
27 base_path, 26 base_path,
28 std::move(io_task_runner), 27 std::move(io_task_runner),
29 std::move(file_task_runner),
30 protocol_handlers, 28 protocol_handlers,
31 std::move(request_interceptors), 29 std::move(request_interceptors),
32 net_log) { 30 net_log) {
33 // Must first be created on the UI thread. 31 // Must first be created on the UI thread.
34 DCHECK_CURRENTLY_ON(BrowserThread::UI); 32 DCHECK_CURRENTLY_ON(BrowserThread::UI);
35 } 33 }
36 34
37 LayoutTestURLRequestContextGetter::~LayoutTestURLRequestContextGetter() { 35 LayoutTestURLRequestContextGetter::~LayoutTestURLRequestContextGetter() {
38 } 36 }
39 37
40 std::unique_ptr<net::NetworkDelegate> 38 std::unique_ptr<net::NetworkDelegate>
41 LayoutTestURLRequestContextGetter::CreateNetworkDelegate() { 39 LayoutTestURLRequestContextGetter::CreateNetworkDelegate() {
42 ShellNetworkDelegate::SetBlockThirdPartyCookies(true); 40 ShellNetworkDelegate::SetBlockThirdPartyCookies(true);
43 return base::WrapUnique(new ShellNetworkDelegate); 41 return base::WrapUnique(new ShellNetworkDelegate);
44 } 42 }
45 43
46 std::unique_ptr<net::ProxyConfigService> 44 std::unique_ptr<net::ProxyConfigService>
47 LayoutTestURLRequestContextGetter::GetProxyConfigService() { 45 LayoutTestURLRequestContextGetter::GetProxyConfigService() {
48 return nullptr; 46 return nullptr;
49 } 47 }
50 48
51 std::unique_ptr<net::ProxyService> 49 std::unique_ptr<net::ProxyService>
52 LayoutTestURLRequestContextGetter::GetProxyService() { 50 LayoutTestURLRequestContextGetter::GetProxyService() {
53 return net::ProxyService::CreateDirect(); 51 return net::ProxyService::CreateDirect();
54 } 52 }
55 53
56 } // namespace content 54 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698