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

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

Issue 773103004: Remove NOTIFICATION_HISTORY_URLS_DELETED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove NotificationObserver from InMemoryURLIndex 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_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 9fb30e40a8331ca11e7c71c05f71bf94ffc72e3c..560cd79ccd2dd6beee103e24bd2bd1f30099c5d4 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -2532,19 +2532,20 @@ void HistoryBackend::NotifyURLsDeleted(bool all_history,
bool expired,
const URLRows& rows,
const std::set<GURL>& favicon_urls) {
- scoped_ptr<URLsDeletedDetails> details(new URLsDeletedDetails);
- details->all_history = all_history;
- details->expired = expired;
- details->rows = rows;
- details->favicon_urls = favicon_urls;
-
+ const URLsDeletedDetails details(all_history, expired, rows, favicon_urls);
if (typed_url_syncable_service_.get()) {
- typed_url_syncable_service_->OnUrlsDeleted(
- all_history, expired, &details->rows);
+ typed_url_syncable_service_->OnUrlsDeleted(all_history, expired,
+ const_cast<URLRows*>(&rows));
sdefresne 2014/12/04 17:21:12 Do *not* use const_cast, instead copy rows into a
nshaik 2014/12/07 09:34:49 Done.
}
- BroadcastNotifications(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- details.Pass());
+ FOR_EACH_OBSERVER(HistoryBackendObserver, observers_,
+ OnURLsDeleted(this, details));
+
+ // TODO(sdefresne): turn HistoryBackend::Delegate from HistoryService into
+ // an HistoryBackendObserver and register it so that we can remove this
+ // method.
+ if (delegate_)
+ delegate_->NotifyURLsDeleted(details);
}
// Deleting --------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698