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 -------------------------------------------------------------------- |