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

Unified Diff: trunk/src/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java

Issue 307013003: Revert 273810 "Added alternative configuration for the data redu..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | « trunk/src/build/common.gypi ('k') | trunk/src/chrome/browser/io_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
===================================================================
--- trunk/src/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java (revision 273823)
+++ trunk/src/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java (working copy)
@@ -10,15 +10,8 @@
import java.text.NumberFormat;
import java.util.Locale;
-/**
- * Entry point to manage all data reduction proxy configuration details.
- */
public class DataReductionProxySettings {
- /**
- * Data structure to hold the original content length before data reduction and the received
- * content length after data reduction.
- */
public static class ContentLengths {
private final long mOriginal;
private final long mReceived;
@@ -44,9 +37,6 @@
private static DataReductionProxySettings sSettings;
- /**
- * Returns a singleton instance of the settings object.
- */
public static DataReductionProxySettings getInstance() {
ThreadUtils.assertOnUiThread();
if (sSettings == null) {
@@ -62,9 +52,17 @@
// DataReductionProxySettings is a singleton that lives forever and there's no clean
// shutdown of Chrome on Android
mNativeDataReductionProxySettings = nativeInit();
+ initDataReductionProxySettings();
}
/**
+ * Initializes the data reduction proxy at Chrome startup.
+ */
+ public void initDataReductionProxySettings() {
+ nativeInitDataReductionProxySettings(mNativeDataReductionProxySettings);
+ }
+
+ /**
* Add a pattern for hosts to bypass. Wildcards should be compatible with the JavaScript
* function shExpMatch, which can be used in proxy PAC resolution. This should be called
* before the proxy is used.
@@ -193,6 +191,8 @@
}
private native long nativeInit();
+ private native void nativeInitDataReductionProxySettings(
+ long nativeDataReductionProxySettingsAndroid);
private native void nativeBypassHostPattern(
long nativeDataReductionProxySettingsAndroid, String pattern);
private native void nativeBypassURLPattern(
« no previous file with comments | « trunk/src/build/common.gypi ('k') | trunk/src/chrome/browser/io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698