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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
232 http_network_session_.reset( | 232 http_network_session_.reset( |
233 new net::HttpNetworkSession(network_session_params)); | 233 new net::HttpNetworkSession(network_session_params)); |
234 main_http_factory_.reset(new net::HttpCache( | 234 main_http_factory_.reset(new net::HttpCache( |
235 http_network_session_.get(), | 235 http_network_session_.get(), |
236 make_scoped_ptr(new net::HttpCache::DefaultBackend( | 236 make_scoped_ptr(new net::HttpCache::DefaultBackend( |
237 net::DISK_CACHE, | 237 net::DISK_CACHE, |
238 net::CACHE_BACKEND_SIMPLE, | 238 net::CACHE_BACKEND_SIMPLE, |
239 cache_path_, | 239 cache_path_, |
240 20 * 1024 * 1024, // 20M | 240 20 * 1024 * 1024, // 20M |
241 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))), | 241 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))), |
242 true /* set_up_quic_server_info */)); | 242 false /* set_up_quic_server_info */)); |
hush (inactive)
2015/12/08 19:12:42
actually this does not seem to turn off quic. At l
| |
243 | 243 |
244 url_request_context_->set_http_transaction_factory(main_http_factory_.get()); | 244 url_request_context_->set_http_transaction_factory(main_http_factory_.get()); |
245 | 245 |
246 job_factory_ = CreateJobFactory(&protocol_handlers_, | 246 job_factory_ = CreateJobFactory(&protocol_handlers_, |
247 request_interceptors_.Pass()); | 247 request_interceptors_.Pass()); |
248 | 248 |
249 job_factory_.reset(new net::URLRequestInterceptingJobFactory( | 249 job_factory_.reset(new net::URLRequestInterceptingJobFactory( |
250 job_factory_.Pass(), | 250 job_factory_.Pass(), |
251 browser_context->GetDataReductionProxyIOData()->CreateInterceptor())); | 251 browser_context->GetDataReductionProxyIOData()->CreateInterceptor())); |
252 url_request_context_->set_job_factory(job_factory_.get()); | 252 url_request_context_->set_job_factory(job_factory_.get()); |
(...skipping 25 matching lines...) Expand all Loading... | |
278 return net_log_.get(); | 278 return net_log_.get(); |
279 } | 279 } |
280 | 280 |
281 void AwURLRequestContextGetter::SetKeyOnIO(const std::string& key) { | 281 void AwURLRequestContextGetter::SetKeyOnIO(const std::string& key) { |
282 DCHECK(AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()); | 282 DCHECK(AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()); |
283 AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()-> | 283 AwBrowserContext::GetDefault()->GetDataReductionProxyIOData()-> |
284 request_options()->SetKeyOnIO(key); | 284 request_options()->SetKeyOnIO(key); |
285 } | 285 } |
286 | 286 |
287 } // namespace android_webview | 287 } // namespace android_webview |
OLD | NEW |