| 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(
|
|
|