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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h

Issue 111113006: Metrics fix for data reduction proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
index 7178da6cafeedc4a5f47d31ecbe9dbd5277904f3..f44f56e54a16936bbffc00091bee6568fd881a94 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h
@@ -37,6 +37,42 @@ const unsigned int kNumDaysInHistorySummary = 30;
COMPILE_ASSERT(kNumDaysInHistorySummary <= kNumDaysInHistory,
DataReductionProxySettings_summary_too_long);
+ // Values of the UMA DataReductionProxy.StartupState histogram.
+ // This enum must remain synchronized with DataReductionProxyStartupState
+ // in metrics/histograms/histograms.xml.
+ enum ProxyStartupState {
+ PROXY_NOT_AVAILABLE = 0,
+ PROXY_DISABLED,
+ PROXY_ENABLED,
+ PROXY_STARTUP_STATE_COUNT,
+ };
+
+ // Values of the UMA DataReductionProxy.ProbeURL histogram.
+ // This enum must remain synchronized with
+ // DataReductionProxyProbeURLFetchResult in metrics/histograms/histograms.xml.
+ // TODO(marq): Rename these histogram buckets with s/DISABLED/RESTRICTED/, so
+ // their names match the behavior they track.
+ enum ProbeURLFetchResult {
+ // The probe failed because the internet was disconnected.
+ INTERNET_DISCONNECTED = 0,
+
+ // The probe failed for any other reason, and as a result, the proxy was
+ // disabled.
+ FAILED_PROXY_DISABLED,
+
+ // The probe failed, but the proxy was already restricted.
+ FAILED_PROXY_ALREADY_DISABLED,
+
+ // THe probe succeeded, and as a result the proxy was restricted.
+ SUCCEEDED_PROXY_ENABLED,
+
+ // The probe succeeded, but the proxy was already restricted.
+ SUCCEEDED_PROXY_ALREADY_ENABLED,
+
+ // This must always be last.
+ PROBE_URL_FETCH_RESULT_COUNT
+ };
+
} // namespace spdyproxy
// Central point for configuring the data reduction proxy.
@@ -172,6 +208,10 @@ class DataReductionProxySettings
// Accessor for unit tests.
std::vector<std::string> BypassRules() { return bypass_rules_;}
+ // Virtualized for mocking
+ virtual void RecordProbeURLFetchResult(spdyproxy::ProbeURLFetchResult result);
+ virtual void RecordStartupState(spdyproxy::ProxyStartupState state);
+
private:
friend class DataReductionProxySettingsTestBase;
friend class DataReductionProxySettingsTest;
« no previous file with comments | « no previous file | chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698