Chromium Code Reviews| Index: components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h |
| diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h |
| index 6c217b2f5768bdba67c736494cee83e2629dc718..ca258fcf8ed5fda149f6432b5c1badb6c0a13d71 100644 |
| --- a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h |
| +++ b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h |
| @@ -6,10 +6,12 @@ |
| #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_USAGE_STATS_H_ |
| #include "base/message_loop/message_loop_proxy.h" |
| +#include "base/prefs/pref_member.h" |
| #include "base/threading/thread_checker.h" |
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
| #include "net/base/host_port_pair.h" |
| #include "net/base/network_change_notifier.h" |
| +#include "net/proxy/proxy_service.h" |
| namespace data_reduction_proxy { |
| @@ -35,8 +37,24 @@ class DataReductionProxyUsageStats |
| */ |
| bool isDataReductionProxyUnreachable(); |
| + /** |
|
bengr
2014/07/12 00:11:59
Use // style comments. Fix the other methods' comm
megjablon
2014/07/14 19:06:41
Done.
|
| + * Records the last bypass reason to |bypass_type_| and sets |
| + * |triggering_request_| to true. |
| + */ |
| + virtual void SetBypassType( |
| + net::ProxyService::DataReductionProxyBypassType type); |
|
bengr
2014/07/12 00:11:59
Move up a line if it fits in 80 chars.
megjablon
2014/07/14 19:06:41
Done.
|
| + |
| + /** |
| + * Records the number of bypassed bytes for various bypass reasons into their |
| + * respective UMAs. |
| + */ |
| + void RecordBypassedBytesHistograms(const int64 content_length, |
| + const net::URLRequest* request); |
| + |
| private: |
| DataReductionProxyParams* data_reduction_proxy_params_; |
| + net::ProxyService::DataReductionProxyBypassType bypass_type_; |
| + bool triggering_request_; |
| base::MessageLoopProxy* ui_thread_proxy_; |
| base::MessageLoopProxy* io_thread_proxy_; |
| @@ -63,6 +81,15 @@ class DataReductionProxyUsageStats |
| base::ThreadChecker thread_checker_; |
| + void RecordTriggeringRequestBypassedBytes( |
| + net::ProxyService::DataReductionProxyBypassType bypass_type, |
| + int64 content_length); |
| + void RecordNetworkErrorBypassedBytes(const net::URLRequest* request, |
| + int64 content_length); |
| + void RecordBypassedBytes( |
| + net::ProxyService::DataReductionProxyBypassType bypass_type, |
| + int64 content_length); |
| + |
| DISALLOW_COPY_AND_ASSIGN(DataReductionProxyUsageStats); |
| }; |