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

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..6fc04d3d3088eb2d93c11bedc4e231b7675179e0 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
@@ -173,8 +173,12 @@ class DataReductionProxySettings
protected:
void InitPrefMembers();
+ // Returns a fetcher for the probe to check if OK to use SPDY.
marq (ping after 24h) 2014/06/16 17:23:35 This probe checks for carrier blocking, right? Not
bengr 2014/06/17 03:42:09 We've considered reasons other than carrier blocki
virtual net::URLFetcher* GetURLFetcher();
+ // Returns a fetcher to warm up the connection to the data reduction proxy.
+ virtual net::URLFetcher* GetURLFetcherForWarmup();
+
// Virtualized for unit test support.
virtual PrefService* GetOriginalProfilePrefs();
virtual PrefService* GetLocalStatePrefs();
@@ -273,6 +277,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 +294,8 @@ class DataReductionProxySettings
bool enabled_by_user_;
scoped_ptr<net::URLFetcher> fetcher_;
marq (ping after 24h) 2014/06/16 17:23:35 Rename to (e.g.) availabilty_check_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