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

Unified Diff: cloud_print/gcp20/prototype/printer_state.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 | « chrome/utility/extensions/unpacker.cc ('k') | components/plugins/renderer/webview_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/gcp20/prototype/printer_state.cc
===================================================================
--- cloud_print/gcp20/prototype/printer_state.cc (revision 245415)
+++ cloud_print/gcp20/prototype/printer_state.cc (working copy)
@@ -8,7 +8,7 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/values.h"
namespace {
@@ -74,7 +74,7 @@
base::JSONWriter::WriteWithOptions(&json,
base::JSONWriter::OPTIONS_PRETTY_PRINT,
&json_str);
- int size = base::checked_numeric_cast<int>(json_str.size());
+ int size = base::checked_cast<int>(json_str.size());
return (file_util::WriteFile(path, json_str.data(), size) == size);
}
« no previous file with comments | « chrome/utility/extensions/unpacker.cc ('k') | components/plugins/renderer/webview_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698