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

Unified Diff: net/disk_cache/blockfile/eviction.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 | « net/disk_cache/blockfile/entry_impl_v3.cc ('k') | net/disk_cache/blockfile/eviction_v3.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/eviction.cc
diff --git a/net/disk_cache/blockfile/eviction.cc b/net/disk_cache/blockfile/eviction.cc
index 46eb2d7f70e2a7f96db88fb20d2485b6a86bc314..6e0dcd5a8339ac27fa35fb2d4fa311b732a7d10c 100644
--- a/net/disk_cache/blockfile/eviction.cc
+++ b/net/disk_cache/blockfile/eviction.cc
@@ -28,6 +28,10 @@
#include "net/disk_cache/blockfile/eviction.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/location.h"
@@ -408,7 +412,7 @@ void Eviction::OnOpenEntryV2(EntryImpl* entry) {
EntryStore* info = entry->entry()->Data();
DCHECK_EQ(ENTRY_NORMAL, info->state);
- if (info->reuse_count < kint32max) {
+ if (info->reuse_count < std::numeric_limits<int32_t>::max()) {
info->reuse_count++;
entry->entry()->set_modified();
@@ -434,7 +438,7 @@ void Eviction::OnCreateEntryV2(EntryImpl* entry) {
break;
};
case ENTRY_EVICTED: {
- if (info->refetch_count < kint32max)
+ if (info->refetch_count < std::numeric_limits<int32_t>::max())
info->refetch_count++;
if (info->refetch_count > kHighUse && info->reuse_count < kHighUse) {
« no previous file with comments | « net/disk_cache/blockfile/entry_impl_v3.cc ('k') | net/disk_cache/blockfile/eviction_v3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698