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

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

Issue 573553004: Eliminate NOTIFICATION_HISTORY_LOADED notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/in_memory_url_index.h
diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h
index 43b15957a0671984190a1ac6d40e1c4b775c933a..1e698d841419d389541431bd61c7501c417f65ec 100644
--- a/chrome/browser/history/in_memory_url_index.h
+++ b/chrome/browser/history/in_memory_url_index.h
@@ -22,11 +22,13 @@
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_url_index_types.h"
#include "chrome/browser/history/scored_history_match.h"
+#include "components/history/core/browser/history_service_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "sql/connection.h"
class HistoryQuickProviderTest;
+class HistoryService;
class Profile;
namespace base {
@@ -68,7 +70,8 @@ struct URLVisitedDetails;
// is being searched on and which character occurs as the second char16 of a
// multi-char16 instance.
class InMemoryURLIndex : public content::NotificationObserver,
- public base::SupportsWeakPtr<InMemoryURLIndex> {
+ public base::SupportsWeakPtr<InMemoryURLIndex>,
+ public history::HistoryServiceObserver {
public:
// Defines an abstract class which is notified upon completion of restoring
// the index's private data either by reading from the cache file or by
@@ -143,6 +146,9 @@ class InMemoryURLIndex : public content::NotificationObserver,
return restored_;
}
+ // Is called when |service| is loaded.
sdefresne 2014/09/23 08:45:09 When overriding methods from an interface, you don
nshaik 2014/10/29 08:43:39 Done.
+ virtual void HistoryServiceLoaded(HistoryService* service) OVERRIDE;
sdefresne 2014/10/20 13:15:42 OVERRIDE -> override
+
private:
friend class ::HistoryQuickProviderTest;
friend class InMemoryURLIndexTest;

Powered by Google App Engine
This is Rietveld 408576698