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

Unified Diff: printing/image.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 | « ppapi/host/error_conversion.cc ('k') | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/image.cc
===================================================================
--- printing/image.cc (revision 245415)
+++ printing/image.cc (working copy)
@@ -8,7 +8,7 @@
#include "base/file_util.h"
#include "base/md5.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "printing/metafile.h"
#include "printing/metafile_impl.h"
@@ -73,7 +73,7 @@
int write_bytes = file_util::WriteFile(
filepath,
reinterpret_cast<char*>(&*compressed.begin()),
- base::checked_numeric_cast<int>(compressed.size()));
+ base::checked_cast<int>(compressed.size()));
success = (write_bytes == static_cast<int>(compressed.size()));
DCHECK(success);
}
@@ -152,7 +152,7 @@
DCHECK(!data.empty());
NativeMetafile metafile;
if (!metafile.InitFromData(data.data(),
- base::checked_numeric_cast<uint32>(data.size())))
+ base::checked_cast<uint32>(data.size())))
return false;
return LoadMetafile(metafile);
}
« no previous file with comments | « ppapi/host/error_conversion.cc ('k') | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698