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_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/android/jni_weak_ref.h" | 9 #include "base/android/jni_weak_ref.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ScopedJavaLocalRef<jlongArray> GetDailyOriginalContentLengths(JNIEnv* env, | 60 ScopedJavaLocalRef<jlongArray> GetDailyOriginalContentLengths(JNIEnv* env, |
61 jobject obj); | 61 jobject obj); |
62 ScopedJavaLocalRef<jlongArray> GetDailyReceivedContentLengths(JNIEnv* env, | 62 ScopedJavaLocalRef<jlongArray> GetDailyReceivedContentLengths(JNIEnv* env, |
63 jobject obj); | 63 jobject obj); |
64 | 64 |
65 // Return a Java |ContentLengths| object wrapping the results of a call to | 65 // Return a Java |ContentLengths| object wrapping the results of a call to |
66 // DataReductionProxySettings::GetContentLengths. | 66 // DataReductionProxySettings::GetContentLengths. |
67 base::android::ScopedJavaLocalRef<jobject> GetContentLengths(JNIEnv* env, | 67 base::android::ScopedJavaLocalRef<jobject> GetContentLengths(JNIEnv* env, |
68 jobject obj); | 68 jobject obj); |
69 | 69 |
70 // Wrapper methods for handling auth challenges. In both of the following, | |
71 // a net::AuthChallengeInfo object is created from |host| and |realm| and | |
72 // passed in to the superclass method. | |
73 jboolean IsAcceptableAuthChallenge(JNIEnv* env, | |
74 jobject obj, | |
75 jstring host, | |
76 jstring realm); | |
77 | |
78 // Determines whether the data reduction proxy is unreachable. This is | 70 // Determines whether the data reduction proxy is unreachable. This is |
79 // done by keeping a count of requests which go through proxy vs those | 71 // done by keeping a count of requests which go through proxy vs those |
80 // which should have gone through the proxy based on the config. | 72 // which should have gone through the proxy based on the config. |
81 jboolean IsDataReductionProxyUnreachable(JNIEnv* env, jobject obj); | 73 jboolean IsDataReductionProxyUnreachable(JNIEnv* env, jobject obj); |
82 | 74 |
83 ScopedJavaLocalRef<jstring> GetTokenForAuthChallenge(JNIEnv* env, | 75 ScopedJavaLocalRef<jstring> GetTokenForAuthChallenge(JNIEnv* env, |
84 jobject obj, | 76 jobject obj, |
85 jstring host, | 77 jstring host, |
86 jstring realm); | 78 jstring realm); |
87 | 79 |
(...skipping 17 matching lines...) Expand all Loading... |
105 TestGetDailyContentLengths); | 97 TestGetDailyContentLengths); |
106 | 98 |
107 | 99 |
108 ScopedJavaLocalRef<jlongArray> GetDailyContentLengths(JNIEnv* env, | 100 ScopedJavaLocalRef<jlongArray> GetDailyContentLengths(JNIEnv* env, |
109 const char* pref_name); | 101 const char* pref_name); |
110 | 102 |
111 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettingsAndroid); | 103 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettingsAndroid); |
112 }; | 104 }; |
113 | 105 |
114 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ | 106 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ |
OLD | NEW |