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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h

Issue 333113002: Move data reduction proxy to Chrome-Proxy header for authentication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers-chrome-proxy-auth
Patch Set: Callback returns void Created 6 years, 6 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 unified diff | Download patch
OLDNEW
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
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 ScopedJavaLocalRef<jstring> GetTokenForAuthChallenge(JNIEnv* env,
79 jobject obj,
80 jstring host,
81 jstring realm);
82
83 // Registers the native methods to be call from Java. 70 // Registers the native methods to be call from Java.
84 static bool Register(JNIEnv* env); 71 static bool Register(JNIEnv* env);
85 72
86 protected: 73 protected:
87 // DataReductionProxySettings overrides. 74 // DataReductionProxySettings overrides.
88 virtual void AddDefaultProxyBypassRules() OVERRIDE; 75 virtual void AddDefaultProxyBypassRules() OVERRIDE;
89 76
90 // Configures the proxy settings by generating a data URL containing a PAC 77 // Configures the proxy settings by generating a data URL containing a PAC
91 // file. 78 // file.
92 virtual void SetProxyConfigs(bool enabled, 79 virtual void SetProxyConfigs(bool enabled,
93 bool alt_enabled, 80 bool alt_enabled,
94 bool restricted, 81 bool restricted,
95 bool at_startup) OVERRIDE; 82 bool at_startup) OVERRIDE;
96 83
97 private: 84 private:
98 friend class DataReductionProxySettingsAndroidTest; 85 friend class DataReductionProxySettingsAndroidTest;
99 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest, 86 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsAndroidTest,
100 TestGetDailyContentLengths); 87 TestGetDailyContentLengths);
101 88
102 89
103 ScopedJavaLocalRef<jlongArray> GetDailyContentLengths(JNIEnv* env, 90 ScopedJavaLocalRef<jlongArray> GetDailyContentLengths(JNIEnv* env,
104 const char* pref_name); 91 const char* pref_name);
105 92
106 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettingsAndroid); 93 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettingsAndroid);
107 }; 94 };
108 95
109 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_ 96 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698