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

Unified Diff: net/disk_cache/simple/simple_index_file.cc

Issue 1340683002: Remove base's implicit_cast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implicitcast: numericstest Created 5 years, 3 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 | « net/disk_cache/entry_unittest.cc ('k') | net/disk_cache/simple/simple_index_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_file.cc
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index c013084041f301cbd5ee378eb0642436d09ba910..11d37a95048b9093e57f3b4987dcd4c9a5d5e1e9 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -11,6 +11,7 @@
#include "base/files/memory_mapped_file.h"
#include "base/hash.h"
#include "base/logging.h"
+#include "base/numerics/safe_conversions.h"
#include "base/pickle.h"
#include "base/single_thread_task_runner.h"
#include "base/task_runner_util.h"
@@ -77,7 +78,7 @@ bool WritePickleFile(base::Pickle* pickle, const base::FilePath& file_name) {
int bytes_written =
file.Write(0, static_cast<const char*>(pickle->data()), pickle->size());
- if (bytes_written != implicit_cast<int>(pickle->size())) {
+ if (bytes_written != base::checked_cast<int>(pickle->size())) {
simple_util::SimpleCacheDeleteFile(file_name);
return false;
}
« no previous file with comments | « net/disk_cache/entry_unittest.cc ('k') | net/disk_cache/simple/simple_index_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698