summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 23:12:56 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 23:12:56 +0000
commit72710a1e7670fbc91c97879dba4d97fb1758c7c0 (patch)
treee7682155e7ef3eb23f61cd030a454a79390db6b1 /chrome/browser
parent93e60735dd29d8ca6028ba01decb0279d68a2ac1 (diff)
downloadchromium_src-72710a1e7670fbc91c97879dba4d97fb1758c7c0.zip
chromium_src-72710a1e7670fbc91c97879dba4d97fb1758c7c0.tar.gz
chromium_src-72710a1e7670fbc91c97879dba4d97fb1758c7c0.tar.bz2
Fix 33138: Clicking on the extension name for an extension downloaded
off the web (non-gallery) goes to the Gallery page (and shows id not found). We now disable this link for non-gallery extensions. BUG=33138 TEST=Download an extension from a non-gallery source. Right click the icon, the name menu item should be grayed out. For extensions from the gallery, it should not be grayed out. It should link to the gallery. Review URL: http://codereview.chromium.org/646026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/extensions/extension_action_context_menu_model.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_action_context_menu_model.cc b/chrome/browser/extensions/extension_action_context_menu_model.cc
index ec87bbe..aa009e1 100644
--- a/chrome/browser/extensions/extension_action_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_action_context_menu_model.cc
@@ -44,8 +44,15 @@ bool ExtensionActionContextMenuModel::IsCommandIdChecked(int command_id) const {
}
bool ExtensionActionContextMenuModel::IsCommandIdEnabled(int command_id) const {
- if (command_id == CONFIGURE)
+ if (command_id == CONFIGURE) {
return extension_->options_url().spec().length() > 0;
+ } else if (command_id == NAME) {
+ // The NAME links to the gallery page, which only makes sense if Google is
+ // hosting the extension. For other 3rd party extensions we don't have a
+ // homepage url, so we just disable this menu item on those cases, at least
+ // for now.
+ return extension_->update_url().DomainIs("google.com");
+ }
return true;
}