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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 false /* No UMA is produced to track bypasses. */) | 211 false /* No UMA is produced to track bypasses. */) |
212 .Pass()); | 212 .Pass()); |
213 #if !defined(DISABLE_FTP_SUPPORT) | 213 #if !defined(DISABLE_FTP_SUPPORT) |
214 builder.set_ftp_enabled(false); // Android WebView does not support ftp yet. | 214 builder.set_ftp_enabled(false); // Android WebView does not support ftp yet. |
215 #endif | 215 #endif |
216 DCHECK(proxy_config_service_.get()); | 216 DCHECK(proxy_config_service_.get()); |
217 // Android provides a local HTTP proxy that handles all the proxying. | 217 // Android provides a local HTTP proxy that handles all the proxying. |
218 // Create the proxy without a resolver since we rely on this local HTTP proxy. | 218 // Create the proxy without a resolver since we rely on this local HTTP proxy. |
219 // TODO(sgurun) is this behavior guaranteed through SDK? | 219 // TODO(sgurun) is this behavior guaranteed through SDK? |
220 builder.set_proxy_service(net::ProxyService::CreateWithoutProxyResolver( | 220 builder.set_proxy_service(net::ProxyService::CreateWithoutProxyResolver( |
221 proxy_config_service_.release(), net_log_.get())); | 221 proxy_config_service_.Pass(), net_log_.get())); |
222 builder.set_net_log(net_log_.get()); | 222 builder.set_net_log(net_log_.get()); |
223 builder.SetCookieAndChannelIdStores(cookie_store_, NULL); | 223 builder.SetCookieAndChannelIdStores(cookie_store_, NULL); |
224 ApplyCmdlineOverridesToURLRequestContextBuilder(&builder); | 224 ApplyCmdlineOverridesToURLRequestContextBuilder(&builder); |
225 | 225 |
226 url_request_context_ = builder.Build().Pass(); | 226 url_request_context_ = builder.Build().Pass(); |
227 // TODO(mnaganov): Fix URLRequestContextBuilder to use proper threads. | 227 // TODO(mnaganov): Fix URLRequestContextBuilder to use proper threads. |
228 net::HttpNetworkSession::Params network_session_params; | 228 net::HttpNetworkSession::Params network_session_params; |
229 | 229 |
230 PopulateNetworkSessionParams(url_request_context_.get(), | 230 PopulateNetworkSessionParams(url_request_context_.get(), |
231 &network_session_params); | 231 &network_session_params); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 return net_log_.get(); | 277 return net_log_.get(); |
278 } | 278 } |
279 | 279 |
280 void AwURLRequestContextGetter::SetKeyOnIO(const std::string& key) { | 280 void AwURLRequestContextGetter::SetKeyOnIO(const std::string& key) { |
281 DCHECK(AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()); | 281 DCHECK(AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()); |
282 AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()-> | 282 AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()-> |
283 request_options()->SetKeyOnIO(key); | 283 request_options()->SetKeyOnIO(key); |
284 } | 284 } |
285 | 285 |
286 } // namespace android_webview | 286 } // namespace android_webview |
OLD | NEW |