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

Unified Diff: chrome/browser/ui/cocoa/history_menu_bridge.mm

Issue 10823114: [Mac] When creating a HistoryMenuBridge, manually poke the TabRestoreService if already loaded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/history_menu_bridge.mm
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm
index 22e83c4eb181e283788f124ff9d4f70fcb3323b7..7dd8218b2ccae2ce20b9e83e0e3c6c6b4c206d81 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm
@@ -92,7 +92,13 @@ HistoryMenuBridge::HistoryMenuBridge(Profile* profile)
tab_restore_service_ = TabRestoreServiceFactory::GetForProfile(profile_);
if (tab_restore_service_) {
tab_restore_service_->AddObserver(this);
- tab_restore_service_->LoadTabsFromLastSession();
+ // If the tab entries are already loaded, invoke the observer method to
+ // build the "Recently Closed" section. Otherwise it will be when the
+ // backend loads.
+ if (!tab_restore_service_->IsLoaded())
+ tab_restore_service_->LoadTabsFromLastSession();
+ else
+ TabRestoreServiceChanged(tab_restore_service_);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698