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

Unified Diff: net/base/network_change_notifier.cc

Issue 760703002: Fix "value possibly truncated" warnings on MSVC, net/base edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 1 month 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/network_change_notifier.cc
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc
index afd6b23d4fa2a0646ef30086ddfea1a86a0c5117..b952aa62e68a38541868b23996b281bcd0663bd4 100644
--- a/net/base/network_change_notifier.cc
+++ b/net/base/network_change_notifier.cc
@@ -305,7 +305,8 @@ class HistogramWatcher
if (bytes_read > 10000 &&
request_duration > base::TimeDelta::FromMilliseconds(1) &&
request.creation_time() > last_connection_change_) {
- int32 kbps = bytes_read * 8 / request_duration.InMilliseconds();
+ int32 kbps = static_cast<int32>(
+ bytes_read * 8 / request_duration.InMilliseconds());
if (kbps > peak_kbps_since_last_connection_change_)
peak_kbps_since_last_connection_change_ = kbps;
}

Powered by Google App Engine
This is Rietveld 408576698