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

Unified Diff: android_webview/native/aw_contents_statics.cc

Issue 333113002: Move data reduction proxy to Chrome-Proxy header for authentication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers-chrome-proxy-auth
Patch Set: errata Created 6 years, 6 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
Index: android_webview/native/aw_contents_statics.cc
diff --git a/android_webview/native/aw_contents_statics.cc b/android_webview/native/aw_contents_statics.cc
index b1fdcbb8dba10a8ddc9df8155f756e45ad506492..95e5549af95644792f4a53a7dbcbb2214f0bb79d 100644
--- a/android_webview/native/aw_contents_statics.cc
+++ b/android_webview/native/aw_contents_statics.cc
@@ -8,7 +8,7 @@
#include "base/android/jni_string.h"
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
-#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h"
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_constants.h"
#include "jni/AwContentsStatics_jni.h"
@@ -18,7 +18,7 @@ using base::android::AttachCurrentThread;
using base::android::ConvertJavaStringToUTF8;
using base::android::ScopedJavaGlobalRef;
using content::BrowserThread;
-using data_reduction_proxy::DataReductionProxySettings;
+using data_reduction_proxy::DataReductionProxyAuthRequestHandler;
namespace android_webview {
@@ -53,10 +53,13 @@ void ClearClientCertPreferences(JNIEnv* env, jclass, jobject callback) {
void SetDataReductionProxyKey(JNIEnv* env, jclass, jstring key) {
AwBrowserContext* browser_context = AwBrowserContext::GetDefault();
DCHECK(browser_context);
- DataReductionProxySettings* drp_settings =
- browser_context->GetDataReductionProxySettings();
- if (drp_settings)
- drp_settings->params()->set_key(ConvertJavaStringToUTF8(env, key));
+ DataReductionProxyAuthRequestHandler* drp_auth_request_handler =
+ browser_context->GetDataReductionProxyAuthRequestHandler();
+ if (drp_auth_request_handler)
+ drp_auth_request_handler->SetKey(
+ ConvertJavaStringToUTF8(env, key),
+ data_reduction_proxy::kClientAndroidWebview,
+ data_reduction_proxy::kProtocolVersion);
}
// static

Powered by Google App Engine
This is Rietveld 408576698