Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Side by Side Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 2977693003: Use TaskRunner passed in to URLRequestContextBuilder only for the cache (Closed)
Patch Set: Actually, don't need to set the thread everywhere Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/cronet/android/cronet_url_request_context_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "android_webview/browser/aw_browser_context.h" 10 #include "android_webview/browser/aw_browser_context.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 builder.set_net_log(net_log_.get()); 247 builder.set_net_log(net_log_.get());
248 builder.SetCookieAndChannelIdStores(base::MakeUnique<AwCookieStoreWrapper>(), 248 builder.SetCookieAndChannelIdStores(base::MakeUnique<AwCookieStoreWrapper>(),
249 std::move(channel_id_service)); 249 std::move(channel_id_service));
250 250
251 net::URLRequestContextBuilder::HttpCacheParams cache_params; 251 net::URLRequestContextBuilder::HttpCacheParams cache_params;
252 cache_params.type = 252 cache_params.type =
253 net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; 253 net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE;
254 cache_params.max_size = 20 * 1024 * 1024; // 20M 254 cache_params.max_size = 20 * 1024 * 1024; // 20M
255 cache_params.path = cache_path_; 255 cache_params.path = cache_path_;
256 builder.EnableHttpCache(cache_params); 256 builder.EnableHttpCache(cache_params);
257 builder.SetFileTaskRunner( 257 builder.SetCacheThreadTaskRunner(
258 BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)); 258 BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE));
259 259
260 net::HttpNetworkSession::Params network_session_params; 260 net::HttpNetworkSession::Params network_session_params;
261 ApplyCmdlineOverridesToNetworkSessionParams(&network_session_params); 261 ApplyCmdlineOverridesToNetworkSessionParams(&network_session_params);
262 builder.set_http_network_session_params(network_session_params); 262 builder.set_http_network_session_params(network_session_params);
263 builder.SetSpdyAndQuicEnabled(true, false); 263 builder.SetSpdyAndQuicEnabled(true, false);
264 264
265 std::unique_ptr<net::MappedHostResolver> host_resolver( 265 std::unique_ptr<net::MappedHostResolver> host_resolver(
266 new net::MappedHostResolver( 266 new net::MappedHostResolver(
267 net::HostResolver::CreateDefaultResolver(nullptr))); 267 net::HostResolver::CreateDefaultResolver(nullptr)));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 http_auth_preferences_->set_server_whitelist( 338 http_auth_preferences_->set_server_whitelist(
339 auth_server_whitelist_.GetValue()); 339 auth_server_whitelist_.GetValue());
340 } 340 }
341 341
342 void AwURLRequestContextGetter::UpdateAndroidAuthNegotiateAccountType() { 342 void AwURLRequestContextGetter::UpdateAndroidAuthNegotiateAccountType() {
343 http_auth_preferences_->set_auth_android_negotiate_account_type( 343 http_auth_preferences_->set_auth_android_negotiate_account_type(
344 auth_android_negotiate_account_type_.GetValue()); 344 auth_android_negotiate_account_type_.GetValue());
345 } 345 }
346 346
347 } // namespace android_webview 347 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/cronet_url_request_context_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698