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

Unified Diff: chrome/browser/history/history_service.cc

Issue 808123003: Eliminate sending NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inline code for provider class Created 6 years 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/history/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index ea860614bae271488bf4f517ea544ee2d3b9f20d..69f67d060dbac35f558d1211a29685392d263905 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -189,6 +189,14 @@ class HistoryService::BackendDelegate : public HistoryBackend::Delegate {
changed_urls));
}
+ void NotifyKeywordSearchTermUpdated(const history::URLRow& row,
+ KeywordID keyword_id,
+ const base::string16& term) override {
+ service_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&HistoryService::NotifyKeywordSearchTermUpdated,
+ history_service_, row, keyword_id, term));
+ }
+
void BroadcastNotifications(
int type,
scoped_ptr<history::HistoryDetails> details) override {
@@ -1280,6 +1288,15 @@ void HistoryService::NotifyHistoryServiceBeingDeleted() {
HistoryServiceBeingDeleted(this));
}
+void HistoryService::NotifyKeywordSearchTermUpdated(
+ const history::URLRow& row,
+ history::KeywordID keyword_id,
+ const base::string16& term) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ FOR_EACH_OBSERVER(history::HistoryServiceObserver, observers_,
+ OnKeywordSearchTermUpdated(this, row, keyword_id, term));
+}
+
scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription>
HistoryService::AddFaviconChangedCallback(
const HistoryService::OnFaviconChangedCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698