summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines/template_url_model.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/search_engines/template_url_model.cc')
-rw-r--r--chrome/browser/search_engines/template_url_model.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc
index 5b5b02e..6c72f5f 100644
--- a/chrome/browser/search_engines/template_url_model.cc
+++ b/chrome/browser/search_engines/template_url_model.cc
@@ -606,8 +606,7 @@ void TemplateURLModel::SetKeywordSearchTermsForURL(const TemplateURL* t_url,
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS) : NULL;
if (!history)
return;
- history->SetKeywordSearchTermsForURL(url, t_url->id(),
- WideToUTF16Hack(term));
+ history->SetKeywordSearchTermsForURL(url, t_url->id(), WideToUTF16Hack(term));
}
void TemplateURLModel::Init(const Initializer* initializers,
@@ -1239,10 +1238,12 @@ void TemplateURLModel::RemoveNoNotify(const TemplateURL* template_url) {
service_->RemoveKeyword(*template_url);
if (profile_) {
- HistoryService* history =
- profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
- if (history)
- history->DeleteAllSearchTermsForKeyword(template_url->id());
+ Source<Profile> source(profile_);
+ TemplateURLID id = template_url->id();
+ NotificationService::current()->Notify(
+ NotificationType::TEMPLATE_URL_REMOVED,
+ source,
+ Details<TemplateURLID>(&id));
}
// We own the TemplateURL and need to delete it.