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

Unified Diff: net/socket_stream/socket_stream_metrics_unittest.cc

Issue 10834011: Refactor of Histogram related code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Index: net/socket_stream/socket_stream_metrics_unittest.cc
===================================================================
--- net/socket_stream/socket_stream_metrics_unittest.cc (revision 148055)
+++ net/socket_stream/socket_stream_metrics_unittest.cc (working copy)
@@ -41,7 +41,7 @@
Histogram::SampleSet sample;
histogram->SnapshotSample(&sample);
- original.Resize(*histogram); // Ensure |original| size is same as |sample|.
+ original.Resize(histogram->bucket_count());
sample.Subtract(original); // Cancel the original values.
EXPECT_EQ(1, sample.counts(SocketStreamMetrics::PROTOCOL_UNKNOWN));
EXPECT_EQ(2, sample.counts(SocketStreamMetrics::PROTOCOL_WEBSOCKET));
@@ -75,7 +75,7 @@
Histogram::SampleSet sample;
histogram->SnapshotSample(&sample);
- original.Resize(*histogram);
+ original.Resize(histogram->bucket_count());
sample.Subtract(original);
EXPECT_EQ(1, sample.counts(SocketStreamMetrics::ALL_CONNECTIONS));
EXPECT_EQ(2, sample.counts(SocketStreamMetrics::TUNNEL_CONNECTION));
@@ -106,7 +106,7 @@
Histogram::SampleSet sample;
histogram->SnapshotSample(&sample);
- original.Resize(*histogram);
+ original.Resize(histogram->bucket_count());
sample.Subtract(original);
EXPECT_EQ(3, sample.counts(SocketStreamMetrics::WIRE_PROTOCOL_WEBSOCKET));
EXPECT_EQ(7, sample.counts(SocketStreamMetrics::WIRE_PROTOCOL_SPDY));

Powered by Google App Engine
This is Rietveld 408576698