diff options
author | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-14 15:08:03 +0000 |
---|---|---|
committer | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-14 15:08:03 +0000 |
commit | b59673e1c3a56622ffb9ed7d62096fedd8796f5c (patch) | |
tree | daa0e5b77000dbd6c850dac18577e70523bf40fd /net/base | |
parent | 5e6ec99df5330e25beb3a955f84d37c243b71e5c (diff) | |
download | chromium_src-b59673e1c3a56622ffb9ed7d62096fedd8796f5c.zip chromium_src-b59673e1c3a56622ffb9ed7d62096fedd8796f5c.tar.gz chromium_src-b59673e1c3a56622ffb9ed7d62096fedd8796f5c.tar.bz2 |
Push MD5 certificate histograms to UMA.
Add a dummy unused bucket at the end of histograms to allow
seamless future expansion.
R=jar
BUG=6102
Review URL: http://codereview.chromium.org/18036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/connection_type_histograms.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/base/connection_type_histograms.cc b/net/base/connection_type_histograms.cc index e01ee8c..9edd98d 100644 --- a/net/base/connection_type_histograms.cc +++ b/net/base/connection_type_histograms.cc @@ -17,21 +17,26 @@ namespace net { // of that type during that session. In the second group (counter2), each // counter is the number of connections of that type the user has seen during // that session. +// +// Each histogram has an unused bucket at the end to allow seamless future +// expansion. void UpdateConnectionTypeHistograms(ConnectionType type) { static bool had_connection_type[NUM_OF_CONNECTION_TYPES]; static LinearHistogram counter1(L"Net.HadConnectionType", - 1, NUM_OF_CONNECTION_TYPES - 1, - NUM_OF_CONNECTION_TYPES); + 1, NUM_OF_CONNECTION_TYPES, + NUM_OF_CONNECTION_TYPES + 1); static LinearHistogram counter2(L"Net.ConnectionTypeCount", - 1, NUM_OF_CONNECTION_TYPES - 1, - NUM_OF_CONNECTION_TYPES); + 1, NUM_OF_CONNECTION_TYPES, + NUM_OF_CONNECTION_TYPES + 1); if (type >= 0 && type < NUM_OF_CONNECTION_TYPES) { if (!had_connection_type[type]) { had_connection_type[type] = true; + counter1.SetFlags(kUmaTargetedHistogramFlag); counter1.Add(type); } } + counter2.SetFlags(kUmaTargetedHistogramFlag); counter2.Add(type); } |