| 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 260f6ca5905320a6e16663659465d5dd46a8c3fd..0346940a46b04498007673c8042ef63609ccef2a 100644
|
| --- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
|
| +++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.h
|
| @@ -15,7 +15,6 @@
|
| #include "base/threading/thread_checker.h"
|
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_configurator.h"
|
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
|
| -#include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h"
|
| #include "net/base/net_util.h"
|
| #include "net/base/network_change_notifier.h"
|
| #include "net/url_request/url_fetcher_delegate.h"
|
| @@ -97,10 +96,6 @@ class DataReductionProxySettings
|
| return params_.get();
|
| }
|
|
|
| - DataReductionProxyUsageStats* usage_stats() const {
|
| - return usage_stats_;
|
| - }
|
| -
|
| // Initializes the data reduction proxy with profile and local state prefs,
|
| // and a |UrlRequestContextGetter| for canary probes. The caller must ensure
|
| // that all parameters remain alive for the lifetime of the
|
| @@ -152,19 +147,27 @@ class DataReductionProxySettings
|
| // data reduction proxy. Each element in the vector contains one day of data.
|
| ContentLengthList GetDailyOriginalContentLengths();
|
|
|
| + // Returns aggregate received and original content lengths over the specified
|
| + // number of days, as well as the time these stats were last updated.
|
| + void GetContentLengths(unsigned int days,
|
| + int64* original_content_length,
|
| + int64* received_content_length,
|
| + int64* last_update_time);
|
| +
|
| + // Records that the data reduction proxy is unreachable or not.
|
| + void SetUnreachable(bool unreachable);
|
| +
|
| // Returns whether the data reduction proxy is unreachable. Returns true
|
| // if no request has successfully completed through proxy, even though atleast
|
| // some of them should have.
|
| bool IsDataReductionProxyUnreachable();
|
|
|
| - // Set the data reduction proxy usage stats.
|
| - void SetDataReductionProxyUsageStats(
|
| - DataReductionProxyUsageStats* usage_stats);
|
| -
|
| // Returns an vector containing the aggregate received HTTP content in the
|
| // last |kNumDaysInHistory| days.
|
| ContentLengthList GetDailyReceivedContentLengths();
|
|
|
| + ContentLengthList GetDailyContentLengths(const char* pref_name);
|
| +
|
| // net::URLFetcherDelegate:
|
| virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
|
|
|
| @@ -183,12 +186,6 @@ class DataReductionProxySettings
|
| virtual PrefService* GetOriginalProfilePrefs();
|
| virtual PrefService* GetLocalStatePrefs();
|
|
|
| - void GetContentLengths(unsigned int days,
|
| - int64* original_content_length,
|
| - int64* received_content_length,
|
| - int64* last_update_time);
|
| - ContentLengthList GetDailyContentLengths(const char* pref_name);
|
| -
|
| // Sets the proxy configs, enabling or disabling the proxy according to
|
| // the value of |enabled| and |alternative_enabled|. Use the alternative
|
| // configuration only if |enabled| and |alternative_enabled| are true. If
|
| @@ -295,6 +292,7 @@ class DataReductionProxySettings
|
| bool restricted_by_carrier_;
|
| bool enabled_by_user_;
|
| bool disabled_on_vpn_;
|
| + bool unreachable_;
|
|
|
| scoped_ptr<net::URLFetcher> fetcher_;
|
| scoped_ptr<net::URLFetcher> warmup_fetcher_;
|
| @@ -312,7 +310,6 @@ class DataReductionProxySettings
|
| base::ThreadChecker thread_checker_;
|
|
|
| scoped_ptr<DataReductionProxyParams> params_;
|
| - DataReductionProxyUsageStats* usage_stats_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings);
|
| };
|
|
|