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

Unified Diff: chrome/browser/media_galleries/win/mtp_device_operations_util.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
Index: chrome/browser/media_galleries/win/mtp_device_operations_util.cc
===================================================================
--- chrome/browser/media_galleries/win/mtp_device_operations_util.cc (revision 245415)
+++ chrome/browser/media_galleries/win/mtp_device_operations_util.cc (working copy)
@@ -12,7 +12,7 @@
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/logging.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
@@ -385,9 +385,9 @@
DCHECK_GT(bytes_read, 0U);
CHECK_LE(bytes_read, buffer.length());
int data_len =
- base::checked_numeric_cast<int>(
+ base::checked_cast<int>(
std::min(bytes_read,
- base::checked_numeric_cast<DWORD>(buffer.length())));
+ base::checked_cast<DWORD>(buffer.length())));
if (file_util::AppendToFile(local_path, buffer.c_str(), data_len) != data_len)
return 0U;
return data_len;
« no previous file with comments | « chrome/browser/media_galleries/linux/snapshot_file_details.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698