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

Unified Diff: components/plugins/renderer/webview_plugin.cc

Issue 141113003: Refactor base/safe_numerics.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 | « cloud_print/gcp20/prototype/printer_state.cc ('k') | components/policy/core/common/cloud/resource_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/plugins/renderer/webview_plugin.cc
===================================================================
--- components/plugins/renderer/webview_plugin.cc (revision 245415)
+++ components/plugins/renderer/webview_plugin.cc (working copy)
@@ -6,7 +6,7 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "content/public/renderer/web_preferences.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebSize.h"
@@ -74,15 +74,15 @@
for (std::list<std::string>::iterator it = data_.begin(); it != data_.end();
++it) {
plugin->didReceiveData(
- it->c_str(), base::checked_numeric_cast<int, size_t>(it->length()));
+ it->c_str(), base::checked_cast<int, size_t>(it->length()));
total_bytes += it->length();
}
UMA_HISTOGRAM_MEMORY_KB(
"PluginDocument.Memory",
- (base::checked_numeric_cast<int, size_t>(total_bytes / 1024)));
+ (base::checked_cast<int, size_t>(total_bytes / 1024)));
UMA_HISTOGRAM_COUNTS(
"PluginDocument.NumChunks",
- (base::checked_numeric_cast<int, size_t>(data_.size())));
+ (base::checked_cast<int, size_t>(data_.size())));
}
if (finished_loading_) {
plugin->didFinishLoading();
« no previous file with comments | « cloud_print/gcp20/prototype/printer_state.cc ('k') | components/policy/core/common/cloud/resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698