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 "android_webview/browser/net/aw_url_request_context_getter.h" | 5 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
10 #include "android_webview/browser/aw_content_browser_client.h" | 10 #include "android_webview/browser/aw_content_browser_client.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { | 71 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { |
72 base::StringToInt(command_line.GetSwitchValueASCII( | 72 base::StringToInt(command_line.GetSwitchValueASCII( |
73 switches::kTestingFixedHttpPort), &value); | 73 switches::kTestingFixedHttpPort), &value); |
74 params->testing_fixed_http_port = value; | 74 params->testing_fixed_http_port = value; |
75 } | 75 } |
76 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { | 76 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { |
77 base::StringToInt(command_line.GetSwitchValueASCII( | 77 base::StringToInt(command_line.GetSwitchValueASCII( |
78 switches::kTestingFixedHttpsPort), &value); | 78 switches::kTestingFixedHttpsPort), &value); |
79 params->testing_fixed_https_port = value; | 79 params->testing_fixed_https_port = value; |
80 } | 80 } |
| 81 if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) { |
| 82 params->ignore_certificate_errors = true; |
| 83 } |
81 } | 84 } |
82 | 85 |
83 void PopulateNetworkSessionParams( | 86 void PopulateNetworkSessionParams( |
84 net::URLRequestContext* context, | 87 net::URLRequestContext* context, |
85 net::HttpNetworkSession::Params* params) { | 88 net::HttpNetworkSession::Params* params) { |
86 params->host_resolver = context->host_resolver(); | 89 params->host_resolver = context->host_resolver(); |
87 params->cert_verifier = context->cert_verifier(); | 90 params->cert_verifier = context->cert_verifier(); |
88 params->channel_id_service = context->channel_id_service(); | 91 params->channel_id_service = context->channel_id_service(); |
89 params->transport_security_state = context->transport_security_state(); | 92 params->transport_security_state = context->transport_security_state(); |
90 params->proxy_service = context->proxy_service(); | 93 params->proxy_service = context->proxy_service(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 request_interceptors_.swap(request_interceptors); | 264 request_interceptors_.swap(request_interceptors); |
262 } | 265 } |
263 | 266 |
264 DataReductionProxyConfigService* | 267 DataReductionProxyConfigService* |
265 AwURLRequestContextGetter::proxy_config_service() { | 268 AwURLRequestContextGetter::proxy_config_service() { |
266 // TODO(bengr): return system config if data reduction proxy is disabled. | 269 // TODO(bengr): return system config if data reduction proxy is disabled. |
267 return proxy_config_service_.get(); | 270 return proxy_config_service_.get(); |
268 } | 271 } |
269 | 272 |
270 } // namespace android_webview | 273 } // namespace android_webview |
OLD | NEW |