summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-22 20:57:06 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-22 20:57:06 +0000
commit59a8437c43b71f1834125ecf50e66dc8add69a5d (patch)
tree933d4da14cf13f19a5c2ef6cac677d5f0e645dd9 /chrome
parent9c94e7e17b009a000e3514196093c044a4844319 (diff)
downloadchromium_src-59a8437c43b71f1834125ecf50e66dc8add69a5d.zip
chromium_src-59a8437c43b71f1834125ecf50e66dc8add69a5d.tar.gz
chromium_src-59a8437c43b71f1834125ecf50e66dc8add69a5d.tar.bz2
Mac: fix toolbar sizing bug upon unloading extension/theme.
BUG=28476 TEST=Install any theme (e.g., "Classic"); click "undo" in infobar; toolbar layout shouldn't change (and the toolbar's contents should be sized correctly). Review URL: http://codereview.chromium.org/418048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/cocoa/extensions/browser_actions_controller.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/cocoa/extensions/browser_actions_controller.mm
index 54ee9d2..5414c27 100644
--- a/chrome/browser/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/cocoa/extensions/browser_actions_controller.mm
@@ -371,9 +371,16 @@ class ExtensionsServiceObserverBridge : public NotificationObserver {
}
- (void)removeActionButtonForExtension:(Extension*)extension {
+ if (!extension->browser_action())
+ return;
+
NSString* buttonKey = base::SysUTF8ToNSString(extension->id());
BrowserActionButton* button = [buttons_ objectForKey:buttonKey];
+ if (!button) {
+ NOTREACHED();
+ return;
+ }
[button removeFromSuperview];
[buttons_ removeObjectForKey:buttonKey];
[buttonOrder_ removeObject:button];