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

Unified Diff: chrome/common/visitedlink_common.h

Issue 42114: Don't leak visited site information from original profile to OTR profile.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « chrome/browser/profile.cc ('k') | chrome/common/visitedlink_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/visitedlink_common.h
===================================================================
--- chrome/common/visitedlink_common.h (revision 11430)
+++ chrome/common/visitedlink_common.h (working copy)
@@ -94,9 +94,8 @@
// function should be called instead of accessing the table directly to
// contain endian issues.
Fingerprint FingerprintAt(int32 table_offset) const {
- DCHECK(hash_table_);
if (!hash_table_)
- return 0;
+ return null_fingerprint_;
return hash_table_[table_offset];
}
@@ -111,6 +110,8 @@
// Computes the hash value of the given fingerprint, this is used as a lookup
// into the hashtable.
static Hash HashFingerprint(Fingerprint fingerprint, int32 table_length) {
+ if (table_length == 0)
+ return null_hash_;
return static_cast<Hash>(fingerprint % table_length);
}
// Uses the current hashtable.
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/common/visitedlink_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698