| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ |
| 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ | 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_helper.h" | 8 #include "base/android/jni_helper.h" |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 static bool Register(JNIEnv* env); | 78 static bool Register(JNIEnv* env); |
| 79 | 79 |
| 80 protected: | 80 protected: |
| 81 // DataReductionProxySettings overrides. | 81 // DataReductionProxySettings overrides. |
| 82 virtual void AddDefaultProxyBypassRules() OVERRIDE; | 82 virtual void AddDefaultProxyBypassRules() OVERRIDE; |
| 83 | 83 |
| 84 // Configures the proxy settings by generating a data URL containing a PAC | 84 // Configures the proxy settings by generating a data URL containing a PAC |
| 85 // file. | 85 // file. |
| 86 virtual void SetProxyConfigs(bool enabled, bool at_startup) OVERRIDE; | 86 virtual void SetProxyConfigs(bool enabled, bool at_startup) OVERRIDE; |
| 87 | 87 |
| 88 virtual void RecordDataReductionInit() OVERRIDE; | |
| 89 | |
| 90 private: | 88 private: |
| 91 friend class DataReductionProxySettingsAndroidTest; | 89 friend class DataReductionProxySettingsAndroidTest; |
| 92 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest, | 90 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest, |
| 93 TestBypassPACRules); | 91 TestBypassPACRules); |
| 94 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest, | 92 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest, |
| 95 TestSetProxyPac); | 93 TestSetProxyPac); |
| 96 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest, | 94 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest, |
| 97 TestGetDailyContentLengths); | 95 TestGetDailyContentLengths); |
| 98 | 96 |
| 99 | 97 |
| 100 ScopedJavaLocalRef<jlongArray> GetDailyContentLengths(JNIEnv* env, | 98 ScopedJavaLocalRef<jlongArray> GetDailyContentLengths(JNIEnv* env, |
| 101 const char* pref_name); | 99 const char* pref_name); |
| 102 std::string GetProxyPacScript(); | 100 std::string GetProxyPacScript(); |
| 103 | 101 |
| 104 std::vector<std::string> pac_bypass_rules_; | 102 std::vector<std::string> pac_bypass_rules_; |
| 105 | 103 |
| 106 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettingsAndroid); | 104 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettingsAndroid); |
| 107 }; | 105 }; |
| 108 | 106 |
| 109 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ | 107 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ |
| OLD | NEW |