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

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

Issue 7610003: More. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 9 years, 4 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/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 2c63978f0eacceee23a3e2d62925a6410ba6bd53..84f9d2a0e7d9ec5177488536d5e9a161f5cc5395 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -55,9 +55,9 @@ BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser,
// This pref applies to all windows, so all must watch for it.
Peter Kasting 2011/08/10 21:30:15 Nit: Maybe use same comment as browser.cc
registrar_.Add(this,
chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
- NotificationService::AllSources());
+ NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_SIDEBAR_CHANGED,
- NotificationService::AllSources());
+ Source<SidebarManager>(SidebarManager::GetInstance()));
}
BrowserWindowCocoa::~BrowserWindowCocoa() {
@@ -608,7 +608,8 @@ void BrowserWindowCocoa::Observe(int type,
// Only the key window gets a direct toggle from the menu.
// Other windows hear about it from the notification.
case chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
- [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
+ if (browser_->profile()->IsSameProfile(Source<Profile>(source).ptr()))
+ [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
break;
case chrome::NOTIFICATION_SIDEBAR_CHANGED:
UpdateSidebarForContents(

Powered by Google App Engine
This is Rietveld 408576698