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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h

Issue 30883003: Simple fallback implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patched
Patch Set: Refactor of authentication handling. Created 7 years, 2 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
Index: chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
index f066d661713d4b39fbef8b3e680667d43f6546dc..897920a73bee8716d37d2578013bcf70533a35de 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
@@ -18,6 +18,9 @@
class PrefService;
namespace net {
+class AuthChallengeInfo;
+class HostPortPair;
+class HttpNetworkSession;
bengr 2013/10/22 01:02:09 alphabetize.
marq (ping after 24h) 2013/10/22 14:44:20 ? Au < Ho < Ht, right?
bengr 2013/10/22 17:49:30 Right. I don't know what I was looking at.
class URLFetcher;
}
@@ -42,12 +45,15 @@ class DataReductionProxySettings
public net::NetworkChangeNotifier::IPAddressObserver {
public:
typedef std::vector<long long> ContentLengthList;
+ typedef std::vector<net::HostPortPair> DataReductionProxyList;
DataReductionProxySettings();
virtual ~DataReductionProxySettings();
void InitDataReductionProxySettings();
+ void InitDataReductionProxySession(net::HttpNetworkSession* session);
bengr 2013/10/22 01:02:09 Add a comment.
marq (ping after 24h) 2013/10/22 14:44:20 Done.
+
// Add a host pattern to bypass. This should follow the same syntax used
// in net::ProxyBypassRules; that is, a hostname pattern, a hostname suffix
// pattern, an IP literal, a CIDR block, or the magic string '<local>'.
@@ -75,8 +81,13 @@ class DataReductionProxySettings
// Returns the URL of the data reduction proxy.
std::string GetDataReductionProxyOrigin();
- // Returns a configuration string for the proxy.
- std::string GetDataReductionProxyAuth();
+ // Returns the URL of the fallback data reduction proxy.
+ std::string GetDataReductionProxyFallback();
+
+ DataReductionProxyList GetDataReductionProxies();
bengr 2013/10/22 01:02:09 Comment.
marq (ping after 24h) 2013/10/22 14:44:20 Done.
+
+ bool IsAcceptableAuthChallenge(net::AuthChallengeInfo* auth_info);
bengr 2013/10/22 01:02:09 Comment.
marq (ping after 24h) 2013/10/22 14:44:20 Done.
+ base::string16 GetTokenForAuthChallenge(net::AuthChallengeInfo* auth_info);
bengr 2013/10/22 01:02:09 Comment.
marq (ping after 24h) 2013/10/22 14:44:20 Done.
// Returns true if the proxy is enabled.
bool IsDataReductionProxyEnabled();
@@ -113,8 +124,6 @@ class DataReductionProxySettings
virtual PrefService* GetOriginalProfilePrefs();
virtual PrefService* GetLocalStatePrefs();
- std::string GetDataReductionProxyOriginHostPort();
-
bool IsProxyOriginSetOnCommandLine();
void GetContentLengths(unsigned int days,
int64* original_content_length,
@@ -150,6 +159,10 @@ class DataReductionProxySettings
friend class DataReductionProxySettingsTestBase;
friend class DataReductionProxySettingsTest;
FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
+ TestAuthHashGeneration);
+ FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
+ TestAuthHashGenerationWithOriginSetViaSwitch);
+ FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
TestResetDataReductionStatistics);
FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
TestIsProxyEnabledOrManaged);
@@ -185,6 +198,8 @@ class DataReductionProxySettings
void ProbeWhetherDataReductionProxyIsAvailable();
std::string GetProxyCheckURL();
+ base::string16 AuthHashForSalt(int64 salt);
bengr 2013/10/22 01:02:09 Comment.
marq (ping after 24h) 2013/10/22 14:44:20 Done.
+
std::vector<std::string> bypass_rules_;
// Indicate whether a user has turned on the data reduction proxy previously

Powered by Google App Engine
This is Rietveld 408576698