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