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

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

Issue 1910023002: Remove partial blockfile v3 disk_cache implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/blockfile/addr.h ('k') | net/disk_cache/blockfile/addr_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/addr.cc
diff --git a/net/disk_cache/blockfile/addr.cc b/net/disk_cache/blockfile/addr.cc
index ab418c4dc037134928b8c030da4190994a9f4b16..cbe42f7f5fa65183c503f4d9488324e4b128ede2 100644
--- a/net/disk_cache/blockfile/addr.cc
+++ b/net/disk_cache/blockfile/addr.cc
@@ -26,7 +26,7 @@ bool Addr::SetFileNumber(int file_number) {
return true;
}
-bool Addr::SanityCheckV2() const {
+bool Addr::SanityCheck() const {
if (!is_initialized())
return !value_;
@@ -39,22 +39,8 @@ bool Addr::SanityCheckV2() const {
return !reserved_bits();
}
-bool Addr::SanityCheckV3() const {
- if (!is_initialized())
- return !value_;
-
- // For actual entries, SanityCheckForEntryV3 should be used.
- if (file_type() > BLOCK_FILES)
- return false;
-
- if (is_separate_file())
- return true;
-
- return !reserved_bits();
-}
-
-bool Addr::SanityCheckForEntryV2() const {
- if (!SanityCheckV2() || !is_initialized())
+bool Addr::SanityCheckForEntry() const {
+ if (!SanityCheck() || !is_initialized())
return false;
if (is_separate_file() || file_type() != BLOCK_256)
@@ -63,24 +49,8 @@ bool Addr::SanityCheckForEntryV2() const {
return true;
}
-bool Addr::SanityCheckForEntryV3() const {
- if (!is_initialized())
- return false;
-
- if (reserved_bits())
- return false;
-
- if (file_type() != BLOCK_ENTRIES && file_type() != BLOCK_EVICTED)
- return false;
-
- if (num_blocks() != 1)
- return false;
-
- return true;
-}
-
bool Addr::SanityCheckForRankings() const {
- if (!SanityCheckV2() || !is_initialized())
+ if (!SanityCheck() || !is_initialized())
return false;
if (is_separate_file() || file_type() != RANKINGS || num_blocks() != 1)
« no previous file with comments | « net/disk_cache/blockfile/addr.h ('k') | net/disk_cache/blockfile/addr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698