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

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: Add ScopedObserver to InMemoryHistoryBackend,PrerenderLocalPredictor,ChromeTemplateURLServiceClient Created 6 years, 1 month 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 93cd55038ad5587025f8f328c62eb0b1b0840f1b..12b4ceef5d5fc729ff9c6397ac95e9b896e4c2ed 100644
--- a/chrome/browser/history/in_memory_url_index.h
+++ b/chrome/browser/history/in_memory_url_index.h
@@ -16,6 +16,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/scoped_observer.h"
#include "base/strings/string16.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/history/history_db_task.h"
@@ -247,6 +248,7 @@ class InMemoryURLIndex : public HistoryServiceObserver,
base::Time visit_time) override;
void OnURLsModified(HistoryService* history_service,
const URLRows& changed_urls) override;
+ void OnHistoryServiceLoaded(HistoryService* history_service) override;
// Notification handlers.
void OnURLsDeleted(const URLsDeletedDetails* details);
@@ -310,6 +312,9 @@ class InMemoryURLIndex : public HistoryServiceObserver,
// index has been destructed.
bool needs_to_be_cached_;
+ ScopedObserver<HistoryService, HistoryServiceObserver>
+ history_service_observer_;
+
DISALLOW_COPY_AND_ASSIGN(InMemoryURLIndex);
};

Powered by Google App Engine
This is Rietveld 408576698