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

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

Issue 773103004: Remove NOTIFICATION_HISTORY_URLS_DELETED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed local variables in tests 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.h
diff --git a/chrome/browser/history/history_service.h b/chrome/browser/history/history_service.h
index 267e82eca125117bed54288e60f4107a4ecb70e3..16b7f344b1687944a4a0e2f0664c678860fa5f9d 100644
--- a/chrome/browser/history/history_service.h
+++ b/chrome/browser/history/history_service.h
@@ -31,8 +31,6 @@
#include "components/keyed_service/core/keyed_service.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "content/public/browser/download_manager_delegate.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "sql/init_status.h"
#include "sync/api/syncable_service.h"
#include "ui/base/page_transition_types.h"
@@ -87,8 +85,7 @@ struct KeywordSearchTermVisit;
//
// This service is thread safe. Each request callback is invoked in the
// thread that made the request.
-class HistoryService : public content::NotificationObserver,
- public syncer::SyncableService,
+class HistoryService : public syncer::SyncableService,
public KeyedService,
public visitedlink::VisitedLinkDelegate {
public:
@@ -560,11 +557,6 @@ class HistoryService : public content::NotificationObserver,
// still in memory (pending requests may be holding a reference to us).
void Cleanup();
- // Implementation of content::NotificationObserver.
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
-
// Implementation of visitedlink::VisitedLinkDelegate.
void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override;
@@ -613,11 +605,24 @@ class HistoryService : public content::NotificationObserver,
// modified. |changed_urls| contains the list of affects URLs.
void NotifyURLsModified(const history::URLRows& changed_urls);
+ // Notify all HistoryServiceObservers registered that URLs have been deleted.
+ // |all_history| is set to true, if all the URLs are deleted.
+ // When set to true, |deleted_rows| and |favicon_urls| are
+ // undefined.
+ // |expired| is set to true, if the URL deletion is due to expiration.
+ // |deleted_rows| list of the deleted URLs.
+ // |favicon_urls| list of favicon URLs that correspond to the deleted URLs.
+ void NotifyURLsDeleted(bool all_history,
+ bool expired,
+ const history::URLRows& deleted_rows,
+ const std::set<GURL>& favicon_urls);
+
// Notify all HistoryServiceObservers registered that the
// HistoryService has finished loading.
void NotifyHistoryServiceLoaded();
- // HistoryService is being deleted.
+ // Notify all HistoryServiceObservers registered that HistoryService is being
+ // deleted.
void NotifyHistoryServiceBeingDeleted();
// Favicon -------------------------------------------------------------------
@@ -863,8 +868,6 @@ class HistoryService : public content::NotificationObserver,
base::ThreadChecker thread_checker_;
- content::NotificationRegistrar registrar_;
-
// The thread used by the history service to run complicated operations.
// |thread_| is NULL once |Cleanup| is NULL.
base::Thread* thread_;

Powered by Google App Engine
This is Rietveld 408576698