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

Unified Diff: chrome/browser/visitedlink/visitedlink_master.cc

Issue 7068017: Fix bug in history salt computation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 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 | « no previous file | chrome/common/visitedlink_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/visitedlink/visitedlink_master.cc
diff --git a/chrome/browser/visitedlink/visitedlink_master.cc b/chrome/browser/visitedlink/visitedlink_master.cc
index eafaf48f7307fac1b593c6e79140170847a47b00..b42ff09c57810c8593e0a4820ab7a912cd5f1439 100644
--- a/chrome/browser/visitedlink/visitedlink_master.cc
+++ b/chrome/browser/visitedlink/visitedlink_master.cc
@@ -36,7 +36,7 @@ const int32 VisitedLinkMaster::kFileHeaderLengthOffset = 8;
const int32 VisitedLinkMaster::kFileHeaderUsedOffset = 12;
const int32 VisitedLinkMaster::kFileHeaderSaltOffset = 16;
-const int32 VisitedLinkMaster::kFileCurrentVersion = 2;
+const int32 VisitedLinkMaster::kFileCurrentVersion = 3;
// the signature at the beginning of the URL table = "VLnk" (visited links)
const int32 VisitedLinkMaster::kFileSignature = 0x6b6e4c56;
@@ -879,6 +879,10 @@ void VisitedLinkMaster::OnTableRebuildComplete(
AddFingerprint(*i, false);
added_since_rebuild_.clear();
+ // We shouldn't be writing the table from the main thread!
+ // http://code.google.com/p/chromium/issues/detail?id=24163
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
// Now handle deletions.
DeleteFingerprintsFromCurrentTable(deleted_since_rebuild_);
deleted_since_rebuild_.clear();
@@ -886,9 +890,6 @@ void VisitedLinkMaster::OnTableRebuildComplete(
// Send an update notification to all child processes.
listener_->NewTable(shared_memory_);
- // We shouldn't be writing the table from the main thread!
- // http://code.google.com/p/chromium/issues/detail?id=24163
- base::ThreadRestrictions::ScopedAllowIO allow_io;
WriteFullTable();
}
}
@@ -965,7 +966,7 @@ VisitedLinkMaster::TableBuilder::TableBuilder(
: master_(master),
success_(true) {
fingerprints_.reserve(4096);
- memcpy(salt_, salt, sizeof(salt));
+ memcpy(salt_, salt, LINK_SALT_LENGTH * sizeof(uint8));
}
// TODO(brettw): Do we want to try to cancel the request if this happens? It
« no previous file with comments | « no previous file | chrome/common/visitedlink_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698