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

Unified Diff: net/base/bandwidth_metrics.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/base/bandwidth_metrics.h
diff --git a/net/base/bandwidth_metrics.h b/net/base/bandwidth_metrics.h
index e5f2646c7dc71ad5b0a96e1f5d94eaa0ab5fb56a..b3bee53fe18eb00ec0d6905668f8df809e9a89cc 100644
--- a/net/base/bandwidth_metrics.h
+++ b/net/base/bandwidth_metrics.h
@@ -57,13 +57,10 @@ class BandwidthMetrics {
: num_streams_in_progress_(0),
num_data_samples_(0),
data_sum_(0.0),
- bytes_since_last_start_(0) {
- }
+ bytes_since_last_start_(0) {}
// Get the bandwidth. Returns Kbps (kilo-bits-per-second).
- double bandwidth() const {
- return data_sum_ / num_data_samples_;
- }
+ double bandwidth() const { return data_sum_ / num_data_samples_; }
// Record that we've started a stream.
void StartStream() {
@@ -92,8 +89,8 @@ class BandwidthMetrics {
double kbps = static_cast<double>(bytes_since_last_start_) * 8 / ms;
++num_data_samples_;
data_sum_ += kbps;
- VLOG(1) << "Bandwidth: " << kbps
- << "Kbps (avg " << bandwidth() << "Kbps)";
+ VLOG(1) << "Bandwidth: " << kbps << "Kbps (avg " << bandwidth()
+ << "Kbps)";
int kbps_int = static_cast<int>(kbps);
UMA_HISTOGRAM_COUNTS_10000("Net.DownloadBandwidth", kbps_int);
}
@@ -107,7 +104,7 @@ class BandwidthMetrics {
}
private:
- int num_streams_in_progress_; // The number of streams in progress.
+ int num_streams_in_progress_; // The number of streams in progress.
// TODO(mbelshe): Use a rolling buffer of 30 samples instead of an average.
int num_data_samples_; // The number of samples collected.
double data_sum_; // The sum of all samples collected.

Powered by Google App Engine
This is Rietveld 408576698