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

Unified Diff: net/disk_cache/blockfile/eviction_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 | « net/disk_cache/blockfile/eviction.cc ('k') | net/disk_cache/blockfile/index_table_v3.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/eviction_v3.cc
diff --git a/net/disk_cache/blockfile/eviction_v3.cc b/net/disk_cache/blockfile/eviction_v3.cc
index 9d404a9172a071033dd82c31ee5cf6f46a22d18e..c658a8e0e527454c933e636225c42683a314d396 100644
--- a/net/disk_cache/blockfile/eviction_v3.cc
+++ b/net/disk_cache/blockfile/eviction_v3.cc
@@ -28,6 +28,10 @@
#include "net/disk_cache/blockfile/eviction_v3.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
@@ -174,7 +178,7 @@ void EvictionV3::OnOpenEntry(EntryImplV3* 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();
@@ -200,7 +204,7 @@ void EvictionV3::OnCreateEntry(EntryImplV3* 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/eviction.cc ('k') | net/disk_cache/blockfile/index_table_v3.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698