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

Unified Diff: chrome/browser/ui/cocoa/history_menu_bridge.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/ui/cocoa/history_menu_bridge.h
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.h b/chrome/browser/ui/cocoa/history_menu_bridge.h
index 5d279a995030b98d27eb3119f345d2e84374ad2a..990734497ef991cd8540748b1326ecd2de3485a5 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.h
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.h
@@ -11,6 +11,7 @@
#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
+#include "base/scoped_observer.h"
#include "base/task/cancelable_task_tracker.h"
#import "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/history/history_service.h"
@@ -149,6 +150,7 @@ class HistoryMenuBridge : public content::NotificationObserver,
base::Time visit_time) override;
void OnURLsModified(HistoryService* history_service,
const history::URLRows& changed_urls) override;
+ void OnHistoryServiceLoaded(HistoryService* service) override;
// Looks up an NSMenuItem in the |menu_item_map_| and returns the
// corresponding HistoryItem.
@@ -240,6 +242,9 @@ class HistoryMenuBridge : public content::NotificationObserver,
// The default favicon if a HistoryItem does not have one.
base::scoped_nsobject<NSImage> default_favicon_;
+ ScopedObserver<HistoryService, HistoryServiceObserver>
+ history_service_observer_;
+
DISALLOW_COPY_AND_ASSIGN(HistoryMenuBridge);
};

Powered by Google App Engine
This is Rietveld 408576698