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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings.h

Issue 338723002: Add probe to warm data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
index c7fb1545ed75601dc46e52f54249279c6e2bb723..eb68f679e2016b17e944e0bd34e725afd511379e 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
@@ -173,7 +173,13 @@ class DataReductionProxySettings
protected:
void InitPrefMembers();
- virtual net::URLFetcher* GetURLFetcher();
+ // Returns a fetcher for the probe to check if OK for the proxy to use SPDY.
+ // Virtual for testing.
+ virtual net::URLFetcher* GetURLFetcherForAvailabilityCheck();
+
+ // Returns a fetcher to warm up the connection to the data reduction proxy.
+ // Virtual for testing.
+ virtual net::URLFetcher* GetURLFetcherForWarmup();
// Virtualized for unit test support.
virtual PrefService* GetOriginalProfilePrefs();
@@ -273,6 +279,12 @@ class DataReductionProxySettings
// failure.
void ProbeWhetherDataReductionProxyIsAvailable();
+ // Warms the connection to the data reduction proxy.
+ void WarmProxyConnection();
+
+ // Generic method to get a URL fetcher.
+ net::URLFetcher* GetBaseURLFetcher(const GURL& gurl, int load_flags);
+
// Returns a UTF16 string that's the hash of the configured authentication
// |key| and |salt|. Returns an empty UTF16 string if no key is configured or
// the data reduction proxy feature isn't available.
@@ -284,6 +296,8 @@ class DataReductionProxySettings
bool enabled_by_user_;
scoped_ptr<net::URLFetcher> fetcher_;
+ scoped_ptr<net::URLFetcher> warmup_fetcher_;
+
BooleanPrefMember spdy_proxy_auth_enabled_;
BooleanPrefMember data_reduction_proxy_alternative_enabled_;

Powered by Google App Engine
This is Rietveld 408576698