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

Unified Diff: chrome/browser/media_galleries/linux/mtp_read_file_worker.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/linux/mtp_read_file_worker.cc
===================================================================
--- chrome/browser/media_galleries/linux/mtp_read_file_worker.cc (revision 245415)
+++ chrome/browser/media_galleries/linux/mtp_read_file_worker.cc (working copy)
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "chrome/browser/media_galleries/linux/snapshot_file_details.h"
#include "chrome/browser/storage_monitor/storage_monitor.h"
#include "content/public/browser/browser_thread.h"
@@ -28,9 +28,9 @@
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
int bytes_written =
file_util::AppendToFile(snapshot_file_path, data.data(),
- base::checked_numeric_cast<int>(data.size()));
+ base::checked_cast<int>(data.size()));
return (static_cast<int>(data.size()) == bytes_written) ?
- base::checked_numeric_cast<uint32>(bytes_written) : 0;
+ base::checked_cast<uint32>(bytes_written) : 0;
}
} // namespace
« no previous file with comments | « chrome/browser/extensions/test_extension_dir.cc ('k') | chrome/browser/media_galleries/linux/snapshot_file_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698