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

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

Issue 690733002: Cleanup HistoryBackend and ExpireHistoryBackend interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@android-cleanup
Patch Set: Address comments Created 6 years, 2 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
Index: chrome/browser/history/expire_history_backend.cc
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index a7c952890eca2e6ca5aaea87d35fa63229c561fd..81914f45ead61e59587cbff4190b00234d0f8552 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -14,9 +14,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
-#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/history/history_database.h"
-#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/thumbnail_database.h"
#include "components/history/core/browser/history_client.h"
@@ -127,7 +125,7 @@ ExpireHistoryBackend::DeleteEffects::~DeleteEffects() {
// ExpireHistoryBackend -------------------------------------------------------
ExpireHistoryBackend::ExpireHistoryBackend(
- BroadcastNotificationDelegate* delegate,
+ ExpireHistoryBackendDelegate* delegate,
HistoryClient* history_client)
: delegate_(delegate),
main_db_(NULL),
@@ -317,22 +315,13 @@ void ExpireHistoryBackend::DeleteFaviconsIfPossible(DeleteEffects* effects) {
void ExpireHistoryBackend::BroadcastNotifications(DeleteEffects* effects,
DeletionType type) {
if (!effects->modified_urls.empty()) {
- scoped_ptr<URLsModifiedDetails> details(new URLsModifiedDetails);
- details->changed_urls = effects->modified_urls;
- delegate_->NotifySyncURLsModified(&details->changed_urls);
- delegate_->BroadcastNotifications(
- chrome::NOTIFICATION_HISTORY_URLS_MODIFIED, details.Pass());
+ delegate_->NotifyURLsModified(effects->modified_urls);
}
if (!effects->deleted_urls.empty()) {
- scoped_ptr<URLsDeletedDetails> details(new URLsDeletedDetails);
- details->all_history = false;
- details->expired = (type == DELETION_EXPIRED);
- details->rows = effects->deleted_urls;
- details->favicon_urls = effects->deleted_favicons;
- delegate_->NotifySyncURLsDeleted(details->all_history, details->expired,
- &details->rows);
- delegate_->BroadcastNotifications(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- details.Pass());
+ delegate_->NotifyURLsDeleted(false,
+ type == DELETION_EXPIRED,
+ effects->deleted_urls,
+ effects->deleted_favicons);
}
}
« no previous file with comments | « chrome/browser/history/expire_history_backend.h ('k') | chrome/browser/history/expire_history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698