Chromium Code Reviews| Index: chrome/browser/app_controller_mac.mm |
| diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm |
| index e888d39706118066c32b37493796c7ab2b0cb6c1..4baeccee6fca8ac7592f18f3a73870a659e56dee 100644 |
| --- a/chrome/browser/app_controller_mac.mm |
| +++ b/chrome/browser/app_controller_mac.mm |
| @@ -893,8 +893,13 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
| // to the old profile. |
| // In a browser test, the application is not brought to the front, so |
| // |lastProfile_| might be null. |
| - if (!lastProfile_ || profilePath == lastProfile_->GetPath()) |
| - lastProfile_ = g_browser_process->profile_manager()->GetLastUsedProfile(); |
| + if (!lastProfile_ || profilePath == lastProfile_->GetPath()) { |
| + // Force windowChangedToProfile to set the lastProfile_ and also update the |
|
Robert Sesek
2015/04/21 18:02:42
nit: : after windowChangedToProfile (colons are pa
Mike Lerman
2015/04/21 19:33:16
Oh Cocoa.
Done.
|
| + // relevant menuBridge objects. |
| + lastProfile_ = NULL; |
|
Robert Sesek
2015/04/21 18:02:42
nullptr
Mike Lerman
2015/04/21 19:33:16
Done.
|
| + [self windowChangedToProfile:g_browser_process->profile_manager()-> |
| + GetLastUsedProfile()]; |
| + } |
| auto it = profileBookmarkMenuBridgeMap_.find(profilePath); |
| if (it != profileBookmarkMenuBridgeMap_.end()) { |
| @@ -1549,6 +1554,10 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
| return bookmarkMenuBridge_; |
| } |
| +- (HistoryMenuBridge*)historyMenuBridge { |
| + return historyMenuBridge_.get(); |
| +} |
| + |
| - (void)addObserverForWorkAreaChange:(ui::WorkAreaWatcherObserver*)observer { |
| workAreaChangeObservers_.AddObserver(observer); |
| } |