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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java

Issue 271523002: Add the plumbing to enable DRP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cache the initial value 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
Index: android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java b/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java
index a7fd4f8470f5ee9f36b726215852159d136cd05c..b7c8ced1bf74146cc28d72f625455da8fb37ccbb 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java
@@ -49,12 +49,22 @@ public class AwContentsStatics {
* Set Data Reduction Proxy key for authentication.
*/
public static void setDataReductionProxyKey(String key) {
+ ThreadUtils.assertOnUiThread();
nativeSetDataReductionProxyKey(key);
}
+ /*
+ * Enable or disable data reduction proxy.
+ */
+ public static void setDataReductionProxyEnabled(boolean enabled) {
+ ThreadUtils.assertOnUiThread();
+ nativeSetDataReductionProxyEnabled(enabled);
+ }
+
//--------------------------------------------------------------------------------------------
// Native methods
//--------------------------------------------------------------------------------------------
private static native void nativeClearClientCertPreferences(Runnable callback);
private static native void nativeSetDataReductionProxyKey(String key);
+ private static native void nativeSetDataReductionProxyEnabled(boolean enabled);
}

Powered by Google App Engine
This is Rietveld 408576698