diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 16:23:17 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 16:23:17 +0000 |
commit | e14e05c948c2ff602fcc6a1137c5c61d112cb38f (patch) | |
tree | 80e11edbf6becb56143a2696005bc6d6bc9cde49 /chrome/browser/search_engines/template_url_model.cc | |
parent | 4a842345af02ac3ae84015683383539a84f66d8c (diff) | |
download | chromium_src-e14e05c948c2ff602fcc6a1137c5c61d112cb38f.zip chromium_src-e14e05c948c2ff602fcc6a1137c5c61d112cb38f.tar.gz chromium_src-e14e05c948c2ff602fcc6a1137c5c61d112cb38f.tar.bz2 |
Makes the in memory db update keyword search terms.
BUG=61518
TEST=none
Review URL: http://codereview.chromium.org/4449002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65065 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url_model.cc')
-rw-r--r-- | chrome/browser/search_engines/template_url_model.cc | 13 |
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. |