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

Unified Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 279633003: Use non-static set_key interface on DataReductionProxySettings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/aw_login_delegate.cc ('k') | android_webview/native/aw_contents_statics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/net/aw_url_request_context_getter.cc
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index 2850b4459d79ad0c17d02ea449f7f20bf98dd412..a49d8939f57a026832d02f200b556024246f8308 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/browser/aw_request_interceptor.h"
#include "android_webview/browser/net/aw_network_delegate.h"
@@ -215,8 +216,18 @@ void AwURLRequestContextGetter::InitializeURLRequestContext() {
20 * 1024 * 1024, // 20M
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)));
+ AwBrowserContext* browser_context = AwBrowserContext::GetDefault();
+ DCHECK(browser_context);
+ DataReductionProxySettings* drp_settings =
+ browser_context->GetDataReductionProxySettings();
+ DCHECK(drp_settings);
+ std::string drp_key = drp_settings->key();
+ // Only precache credentials if a key is available at URLRequestContext
+ // initialization.
+ if (!drp_key.empty()) {
DataReductionProxySettings::InitDataReductionProxySession(
- main_cache->GetSession());
+ main_cache->GetSession(), drp_settings->key());
+ }
main_http_factory_.reset(main_cache);
url_request_context_->set_http_transaction_factory(main_cache);
« no previous file with comments | « android_webview/browser/aw_login_delegate.cc ('k') | android_webview/native/aw_contents_statics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698