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

Unified Diff: chrome/browser/search_engines/template_url_model.cc

Issue 3161038: Nothing is ever added to hosts_to_delete_, so this code does nothing useful. (Closed)
Patch Set: Created 10 years, 4 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/search_engines/template_url_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_model.cc
diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc
index a7f1a4a8776ed1cc0de164876bdb7946de322112..45ee1d5ccdb9552eef3bd8c7677b427f5cb22b39 100644
--- a/chrome/browser/search_engines/template_url_model.cc
+++ b/chrome/browser/search_engines/template_url_model.cc
@@ -565,13 +565,6 @@ void TemplateURLModel::OnWebDataServiceRequestDone(
if (default_search_provider_)
SaveDefaultSearchProviderToPrefs(default_search_provider_);
- // Delete any hosts that were deleted before we finished loading.
- for (std::vector<std::wstring>::iterator i = hosts_to_delete_.begin();
- i != hosts_to_delete_.end(); ++i) {
- DeleteGeneratedKeywordsMatchingHost(*i);
- }
- hosts_to_delete_.clear();
-
// Index any visits that occurred before we finished loading.
for (size_t i = 0; i < visits_to_add_.size(); ++i)
UpdateKeywordSearchTermsForURL(visits_to_add_[i]);
@@ -761,20 +754,6 @@ void TemplateURLModel::SetTemplateURLs(
}
}
-void TemplateURLModel::DeleteGeneratedKeywordsMatchingHost(
- const std::wstring& host) {
- const std::wstring host_slash = host + L"/";
- // Iterate backwards as we may end up removing multiple entries.
- for (int i = static_cast<int>(template_urls_.size()) - 1; i >= 0; --i) {
- if (CanReplace(template_urls_[i]) &&
- (template_urls_[i]->keyword() == host ||
- template_urls_[i]->keyword().compare(0, host_slash.length(),
- host_slash) == 0)) {
- Remove(template_urls_[i]);
- }
- }
-}
-
void TemplateURLModel::NotifyLoaded() {
NotificationService::current()->Notify(
NotificationType::TEMPLATE_URL_MODEL_LOADED,
« no previous file with comments | « chrome/browser/search_engines/template_url_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698