summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/addr.h
diff options
context:
space:
mode:
authorrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 04:58:18 +0000
committerrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 04:58:18 +0000
commit82ae49ebded8ae66cdc0a70aceeeff66cecc4f2f (patch)
tree8e610f950716d8ae3313945f1622436cfa726221 /net/disk_cache/addr.h
parent8b3b3615e382d40dbfafca8a3f4b45552214953b (diff)
downloadchromium_src-82ae49ebded8ae66cdc0a70aceeeff66cecc4f2f.zip
chromium_src-82ae49ebded8ae66cdc0a70aceeeff66cecc4f2f.tar.gz
chromium_src-82ae49ebded8ae66cdc0a70aceeeff66cecc4f2f.tar.bz2
Disk Cache: Add more corruption tracking histograms.
BUG=none TEST=none Review URL: http://codereview.chromium.org/10148001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/addr.h')
-rw-r--r--net/disk_cache/addr.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/disk_cache/addr.h b/net/disk_cache/addr.h
index aa81a16..b398934 100644
--- a/net/disk_cache/addr.h
+++ b/net/disk_cache/addr.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -94,6 +94,14 @@ class NET_EXPORT_PRIVATE Addr {
return BlockSizeForFileType(file_type());
}
+ bool operator==(Addr other) const {
+ return value_ == other.value_;
+ }
+
+ bool operator!=(Addr other) const {
+ return value_ != other.value_;
+ }
+
static int BlockSizeForFileType(FileType file_type) {
switch (file_type) {
case RANKINGS:
@@ -122,6 +130,8 @@ class NET_EXPORT_PRIVATE Addr {
// Returns true if this address looks like a valid one.
bool SanityCheck() const;
+ bool SanityCheckForEntry() const;
+ bool SanityCheckForRankings() const;
private:
static const uint32 kInitializedMask = 0x80000000;