Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| index 385bf60ea791135f7f7426cd445cee62bb791149..6b115a3ce23dfab56a92e3db07dd01586d4806a1 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| @@ -51,6 +51,7 @@ class DataReductionProxyConfigValues; |
| class DataReductionProxyConfigurator; |
| class DataReductionProxyEventCreator; |
| class SecureProxyChecker; |
| +class WarmupURLFetcher; |
| struct DataReductionProxyTypeInfo; |
| // Values of the UMA DataReductionProxy.ProbeURL histogram. |
| @@ -103,8 +104,13 @@ class DataReductionProxyConfig |
| ~DataReductionProxyConfig() override; |
| // Performs initialization on the IO thread. |
| - void InitializeOnIOThread(const scoped_refptr<net::URLRequestContextGetter>& |
| - url_request_context_getter); |
| + // |basic_url_request_context_getter| is the net::URLRequestContextGetter that |
| + // disables the use of alternative protocols. |url_request_context_getter| is |
|
RyanSturm
2016/12/08 20:59:17
nit: s/alternative protocols/alternative protocols
tbansal1
2016/12/10 00:48:49
Done.
|
| + // the default net::URLRequestContextGetter used for making URL requests. |
| + void InitializeOnIOThread( |
| + const scoped_refptr<net::URLRequestContextGetter>& |
| + basic_url_request_context_getter, |
| + net::URLRequestContextGetter* url_request_context_getter); |
| // Sets the proxy configs, enabling or disabling the proxy according to |
| // the value of |enabled|. If |restricted| is true, only enable the fallback |
| @@ -214,6 +220,10 @@ class DataReductionProxyConfig |
| // Updates the Data Reduction Proxy configurator with the current config. |
| void UpdateConfigForTesting(bool enabled, bool restricted); |
| + // Updates the callback called when the warm up URL has been fetched. |
|
RyanSturm
2016/12/08 20:59:17
s/callback called/callback that is called/
tbansal1
2016/12/10 00:48:49
Done.
|
| + void SetWarmupURLFetcherCallbackForTesting( |
| + base::Callback<void()> warmup_url_fetched_callback); |
| + |
| private: |
| friend class MockDataReductionProxyConfig; |
| friend class TestDataReductionProxyConfig; |
| @@ -230,6 +240,7 @@ class DataReductionProxyConfig |
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxyConfigTest, LoFiAccuracy); |
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxyConfigTest, |
| LoFiAccuracyNonZeroDelay); |
| + FRIEND_TEST_ALL_PREFIXES(DataReductionProxyConfigTest, WarmupURL); |
| // Values of the estimated network quality at the beginning of the most |
| // recent query of the Network Quality Estimator. |
| @@ -308,8 +319,13 @@ class DataReductionProxyConfig |
| // for testing. |
| virtual bool GetIsCaptivePortal() const; |
| + // Fetches the warm up URL. |
| + void FetchWarmupURL(); |
| + |
| std::unique_ptr<SecureProxyChecker> secure_proxy_checker_; |
| + std::unique_ptr<WarmupURLFetcher> warmup_url_fetcher_; |
|
RyanSturm
2016/12/08 20:59:17
member comment for warmup_url_fetcher_. And for se
tbansal1
2016/12/10 00:48:49
Done.
|
| + |
| // Indicates if the secure Data Reduction Proxy can be used or not. |
| bool secure_proxy_allowed_; |