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

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

Issue 10096015: Single URL Expires Were Not Being Deleted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « chrome/browser/visitedlink/visitedlink_master.h ('k') | chrome/browser/visitedlink/visitedlink_unittest.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
===================================================================
--- chrome/browser/visitedlink/visitedlink_master.cc (revision 132411)
+++ chrome/browser/visitedlink/visitedlink_master.cc (working copy)
@@ -289,10 +289,10 @@
listener_->Reset();
}
-void VisitedLinkMaster::DeleteURLs(const std::set<GURL>& urls) {
+void VisitedLinkMaster::DeleteURLs(const history::URLRows& rows) {
typedef std::set<GURL>::const_iterator SetIterator;
- if (urls.empty())
+ if (rows.empty())
return;
listener_->Reset();
@@ -300,12 +300,14 @@
if (table_builder_) {
// A rebuild is in progress, save this deletion in the temporary list so
// it can be added once rebuild is complete.
- for (SetIterator i = urls.begin(); i != urls.end(); ++i) {
- if (!i->is_valid())
+ for (history::URLRows::const_iterator i = rows.begin(); i != rows.end();
+ ++i) {
+ const GURL& url(i->url());
+ if (!url.is_valid())
continue;
Fingerprint fingerprint =
- ComputeURLFingerprint(i->spec().data(), i->spec().size(), salt_);
+ ComputeURLFingerprint(url.spec().data(), url.spec().size(), salt_);
deleted_since_rebuild_.insert(fingerprint);
// If the URL was just added and now we're deleting it, it may be in the
@@ -324,11 +326,13 @@
// Compute the deleted URLs' fingerprints and delete them
std::set<Fingerprint> deleted_fingerprints;
- for (SetIterator i = urls.begin(); i != urls.end(); ++i) {
- if (!i->is_valid())
+ for (history::URLRows::const_iterator i = rows.begin(); i != rows.end();
+ ++i) {
+ const GURL& url(i->url());
+ if (!url.is_valid())
continue;
deleted_fingerprints.insert(
- ComputeURLFingerprint(i->spec().data(), i->spec().size(), salt_));
+ ComputeURLFingerprint(url.spec().data(), url.spec().size(), salt_));
}
DeleteFingerprintsFromCurrentTable(deleted_fingerprints);
}
« no previous file with comments | « chrome/browser/visitedlink/visitedlink_master.h ('k') | chrome/browser/visitedlink/visitedlink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698