 Chromium Code Reviews
 Chromium Code Reviews| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 } else { | 201 } else { | 
| 202 builder.set_proxy_config_service( | 202 builder.set_proxy_config_service( | 
| 203 net::ProxyService::CreateSystemProxyConfigService( | 203 net::ProxyService::CreateSystemProxyConfigService( | 
| 204 GetNetworkTaskRunner(), NULL /* Ignored on Android */ )); | 204 GetNetworkTaskRunner(), NULL /* Ignored on Android */ )); | 
| 205 } | 205 } | 
| 206 builder.set_accept_language(net::HttpUtil::GenerateAcceptLanguageHeader( | 206 builder.set_accept_language(net::HttpUtil::GenerateAcceptLanguageHeader( | 
| 207 AwContentBrowserClient::GetAcceptLangsImpl())); | 207 AwContentBrowserClient::GetAcceptLangsImpl())); | 
| 208 ApplyCmdlineOverridesToURLRequestContextBuilder(&builder); | 208 ApplyCmdlineOverridesToURLRequestContextBuilder(&builder); | 
| 209 | 209 | 
| 210 url_request_context_.reset(builder.Build()); | 210 url_request_context_.reset(builder.Build()); | 
| 211 // TODO(sgurun) Enable once we provide a better way to control this mechanism. | |
| 212 // See b/17177684 | |
| 
boliu
2014/08/23 16:35:58
nit: we generally don't put internal bugs into cho
 | |
| 213 #if 0 | |
| 211 channel_id_service_.reset( | 214 channel_id_service_.reset( | 
| 212 new net::ChannelIDService( | 215 new net::ChannelIDService( | 
| 213 new net::DefaultChannelIDStore(NULL), | 216 new net::DefaultChannelIDStore(NULL), | 
| 214 base::WorkerPool::GetTaskRunner(true))); | 217 base::WorkerPool::GetTaskRunner(true))); | 
| 215 url_request_context_->set_channel_id_service(channel_id_service_.get()); | 218 url_request_context_->set_channel_id_service(channel_id_service_.get()); | 
| 219 #endif | |
| 216 // TODO(mnaganov): Fix URLRequestContextBuilder to use proper threads. | 220 // TODO(mnaganov): Fix URLRequestContextBuilder to use proper threads. | 
| 217 net::HttpNetworkSession::Params network_session_params; | 221 net::HttpNetworkSession::Params network_session_params; | 
| 218 | 222 | 
| 219 PopulateNetworkSessionParams(url_request_context_.get(), | 223 PopulateNetworkSessionParams(url_request_context_.get(), | 
| 220 &network_session_params); | 224 &network_session_params); | 
| 221 | 225 | 
| 222 net::HttpCache* main_cache = new net::HttpCache( | 226 net::HttpCache* main_cache = new net::HttpCache( | 
| 223 network_session_params, | 227 network_session_params, | 
| 224 new net::HttpCache::DefaultBackend( | 228 new net::HttpCache::DefaultBackend( | 
| 225 net::DISK_CACHE, | 229 net::DISK_CACHE, | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 std::swap(protocol_handlers_, *protocol_handlers); | 279 std::swap(protocol_handlers_, *protocol_handlers); | 
| 276 request_interceptors_.swap(request_interceptors); | 280 request_interceptors_.swap(request_interceptors); | 
| 277 } | 281 } | 
| 278 | 282 | 
| 279 data_reduction_proxy::DataReductionProxyAuthRequestHandler* | 283 data_reduction_proxy::DataReductionProxyAuthRequestHandler* | 
| 280 AwURLRequestContextGetter::GetDataReductionProxyAuthRequestHandler() const { | 284 AwURLRequestContextGetter::GetDataReductionProxyAuthRequestHandler() const { | 
| 281 return data_reduction_proxy_auth_request_handler_.get(); | 285 return data_reduction_proxy_auth_request_handler_.get(); | 
| 282 } | 286 } | 
| 283 | 287 | 
| 284 } // namespace android_webview | 288 } // namespace android_webview | 
| OLD | NEW |