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

Unified Diff: net/disk_cache/blockfile/backend_worker_v3.cc

Issue 1499423004: Remove kint32max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint9
Patch Set: rebase Created 5 years 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 | « media/formats/mp4/box_reader.cc ('k') | net/disk_cache/blockfile/entry_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/backend_worker_v3.cc
diff --git a/net/disk_cache/blockfile/backend_worker_v3.cc b/net/disk_cache/blockfile/backend_worker_v3.cc
index 9d2e6a61f3cfb09f19490193aa00f3a5ea3a18cf..2fddb9b8e1df6aa9e2af3ca8ef0bcb23d23e2d53 100644
--- a/net/disk_cache/blockfile/backend_worker_v3.cc
+++ b/net/disk_cache/blockfile/backend_worker_v3.cc
@@ -4,6 +4,10 @@
#include "net/disk_cache/blockfile/backend_worker_v3.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/files/file_path.h"
@@ -397,7 +401,7 @@ bool BackendImpl::CheckIndex() {
#if !defined(NET_BUILD_STRESS_CACHE)
if (data_->header.num_bytes < 0 ||
- (max_size_ < kint32max - kDefaultCacheSize &&
+ (max_size_ < std::numeric_limits<int32_t>::max() - kDefaultCacheSize &&
data_->header.num_bytes > max_size_ + kDefaultCacheSize)) {
LOG(ERROR) << "Invalid cache (current) size";
return false;
« no previous file with comments | « media/formats/mp4/box_reader.cc ('k') | net/disk_cache/blockfile/entry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698