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

Unified Diff: chrome/browser/autocomplete/network_action_predictor.cc

Issue 10031028: 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
Index: chrome/browser/autocomplete/network_action_predictor.cc
===================================================================
--- chrome/browser/autocomplete/network_action_predictor.cc (revision 132078)
+++ chrome/browser/autocomplete/network_action_predictor.cc (working copy)
@@ -202,7 +202,7 @@
if (urls_deleted_details->all_history)
DeleteAllRows();
else
- DeleteRowsWithURLs(urls_deleted_details->urls);
+ DeleteRowsWithURLs(urls_deleted_details->rows);
break;
}
@@ -465,14 +465,15 @@
DATABASE_ACTION_DELETE_ALL, DATABASE_ACTION_COUNT);
}
-void NetworkActionPredictor::DeleteRowsWithURLs(const std::set<GURL>& urls) {
+void NetworkActionPredictor::DeleteRowsWithURLs(const history::URLRows& rows) {
if (!initialized_)
return;
std::vector<NetworkActionPredictorDatabase::Row::Id> id_list;
for (DBCacheMap::iterator it = db_cache_.begin(); it != db_cache_.end();) {
- if (urls.find(it->first.url) != urls.end()) {
+ if (std::find_if(rows.begin(), rows.end(),
+ history::URLRow::URLRowHasURL(it->first.url)) != rows.end()) {
const DBIdCacheMap::iterator id_it = db_id_cache_.find(it->first);
DCHECK(id_it != db_id_cache_.end());
id_list.push_back(id_it->second);

Powered by Google App Engine
This is Rietveld 408576698