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

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

Issue 642623004: Rename VisitDatabaseObserver to HistoryServiceObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@373326
Patch Set: Address comments & rebase 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
« no previous file with comments | « chrome/browser/history/history_backend_unittest.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_service.h
diff --git a/chrome/browser/history/history_service.h b/chrome/browser/history/history_service.h
index 9e467bb97a9c4e74d2bfacd9b3064d164f16fd87..c9f29107a9b58c5c7763fc3ba80a4654c8450079 100644
--- a/chrome/browser/history/history_service.h
+++ b/chrome/browser/history/history_service.h
@@ -64,12 +64,12 @@ class HistoryClient;
class HistoryDatabase;
class HistoryDBTask;
class HistoryQueryTest;
+class HistoryServiceObserver;
class HistoryTest;
class InMemoryHistoryBackend;
class InMemoryURLIndex;
class InMemoryURLIndexTest;
class URLDatabase;
-class VisitDatabaseObserver;
class VisitFilter;
struct DownloadRow;
struct HistoryAddPageArgs;
@@ -430,6 +430,12 @@ class HistoryService : public content::NotificationObserver,
// Notification that a URL is no longer bookmarked.
void URLsNoLongerBookmarked(const std::set<GURL>& urls);
+ // Observers -----------------------------------------------------------------
+
+ // Adds/Removes an Observer.
+ void AddObserver(history::HistoryServiceObserver* observer);
+ void RemoveObserver(history::HistoryServiceObserver* observer);
+
// Generic Stuff -------------------------------------------------------------
// Schedules a HistoryDBTask for running on the history backend thread. See
@@ -437,12 +443,6 @@ class HistoryService : public content::NotificationObserver,
virtual void ScheduleDBTask(scoped_ptr<history::HistoryDBTask> task,
base::CancelableTaskTracker* tracker);
- // Adds or removes observers for the VisitDatabase.
- void AddVisitDatabaseObserver(history::VisitDatabaseObserver* observer);
- void RemoveVisitDatabaseObserver(history::VisitDatabaseObserver* observer);
-
- void NotifyVisitDBObserversOnAddVisit(const history::BriefVisitInfo& info);
-
// This callback is invoked when favicon change for urls.
typedef base::Callback<void(const std::set<GURL>&)> OnFaviconChangedCallback;
@@ -589,6 +589,11 @@ class HistoryService : public content::NotificationObserver,
// available or the URL does not exist.
bool GetRowForURL(const GURL& url, history::URLRow* url_row);
+ // Observers -----------------------------------------------------------------
+
+ // Notify all Observers registered that the VisitDatabase was changed.
+ void NotifyAddVisit(const history::BriefVisitInfo& info);
+
// Favicon -------------------------------------------------------------------
// These favicon methods are exposed to the FaviconService. Instead of calling
@@ -873,8 +878,7 @@ class HistoryService : public content::NotificationObserver,
// See http://crbug.com/138321
scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
- ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
-
+ ObserverList<history::HistoryServiceObserver> observers_;
base::CallbackList<void(const std::set<GURL>&)>
favicon_changed_callback_list_;
« no previous file with comments | « chrome/browser/history/history_backend_unittest.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698