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

Unified Diff: chrome/utility/extensions/unpacker.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/renderer/pepper/ppb_pdf_impl.cc ('k') | cloud_print/gcp20/prototype/printer_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/extensions/unpacker.cc
===================================================================
--- chrome/utility/extensions/unpacker.cc (revision 245415)
+++ chrome/utility/extensions/unpacker.cc (working copy)
@@ -12,7 +12,7 @@
#include "base/i18n/rtl.h"
#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_handle.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
@@ -86,7 +86,7 @@
}
bool WritePickle(const IPC::Message& pickle, const base::FilePath& dest_path) {
- int size = base::checked_numeric_cast<int>(pickle.size());
+ int size = base::checked_cast<int>(pickle.size());
const char* data = static_cast<const char*>(pickle.data());
int bytes_written = file_util::WriteFile(dest_path, data, size);
return (bytes_written == size);
« no previous file with comments | « chrome/renderer/pepper/ppb_pdf_impl.cc ('k') | cloud_print/gcp20/prototype/printer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698