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

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: Fixed styling issues 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
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 70f5c4d3eed41789e895012427086a6bebd43729..9aa493f8f6b25c3b6fef3573469eddba60535480 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"
@@ -147,6 +148,7 @@ class HistoryMenuBridge : public content::NotificationObserver,
const history::URLRow& row,
const history::RedirectList& redirects,
base::Time visit_time) override;
+ void OnHistoryServiceLoaded(HistoryService* service) override;
// Looks up an NSMenuItem in the |menu_item_map_| and returns the
// corresponding HistoryItem.
@@ -238,6 +240,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