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

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: Rebase to tip Created 5 years, 11 months 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
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 9e1a584f7197700a5c895d96b2da3e3cd773a1e5..c34f9b4200fcee104abb9b2403ae3d72e68e9fc9 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -24,7 +24,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/in_memory_history_backend.h"
#include "chrome/browser/history/in_memory_history_backend.h"
#include "chrome/browser/history/top_sites.h"
@@ -2489,15 +2488,6 @@ void HistoryBackend::ProcessDBTask(
ProcessDBTaskImpl();
}
-void HistoryBackend::BroadcastNotifications(
- int type,
- scoped_ptr<HistoryDetails> details) {
- // |delegate_| may be NULL if |this| is in the process of closing (closed by
- // HistoryService -> HistoryBackend::Closing().
- if (delegate_)
- delegate_->BroadcastNotifications(type, details.Pass());
-}
-
void HistoryBackend::NotifyFaviconChanged(const std::set<GURL>& urls) {
if (delegate_)
delegate_->NotifyFaviconChanged(urls);
@@ -2542,19 +2532,22 @@ 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;
-
+ URLRows copied_rows(rows);
if (typed_url_syncable_service_.get()) {
- typed_url_syncable_service_->OnUrlsDeleted(
- all_history, expired, &details->rows);
+ typed_url_syncable_service_->OnUrlsDeleted(all_history, expired,
+ &copied_rows);
}
- BroadcastNotifications(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- details.Pass());
+ FOR_EACH_OBSERVER(
+ HistoryBackendObserver, observers_,
+ OnURLsDeleted(this, all_history, expired, copied_rows, favicon_urls));
+
+ // TODO(sdefresne): turn HistoryBackend::Delegate from HistoryService into
+ // an HistoryBackendObserver and register it so that we can remove this
+ // method.
+ if (delegate_)
+ delegate_->NotifyURLsDeleted(all_history, expired, copied_rows,
+ favicon_urls);
}
// Deleting --------------------------------------------------------------------
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698