summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_context_menu_model.cc
diff options
context:
space:
mode:
authortessamac@google.com <tessamac@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 18:17:58 +0000
committertessamac@google.com <tessamac@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 18:17:58 +0000
commit37cd64d34bc3dbf2385a3c312c92bb3c7c65664a (patch)
tree8edbd5db58ecfc090a4f2c41f26e01fb88536bc0 /chrome/browser/extensions/extension_context_menu_model.cc
parent0b1ed04aa570de0073ffd6789513c514882d36b4 (diff)
downloadchromium_src-37cd64d34bc3dbf2385a3c312c92bb3c7c65664a.zip
chromium_src-37cd64d34bc3dbf2385a3c312c92bb3c7c65664a.tar.gz
chromium_src-37cd64d34bc3dbf2385a3c312c92bb3c7c65664a.tar.bz2
Add optional homepage_url to manifest and use it in place of Gallery URL in UI.
BUG=28907 TEST=Added homepage_url to manifest, check that it replaces gallery URL link. Review URL: http://codereview.chromium.org/3767013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63749 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_context_menu_model.cc')
-rw-r--r--chrome/browser/extensions/extension_context_menu_model.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc
index 736b387..6432f9d 100644
--- a/chrome/browser/extensions/extension_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_context_menu_model.cc
@@ -80,11 +80,9 @@ bool ExtensionContextMenuModel::IsCommandIdEnabled(int command_id) const {
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->GalleryUrl().is_valid();
+ // The NAME links to the Homepage URL. If the extension doesn't have a
+ // homepage, we just disable this menu item.
+ return extension->GetHomepageURL().is_valid();
} else if (command_id == INSPECT_POPUP) {
TabContents* contents = browser_->GetSelectedTabContents();
if (!contents)
@@ -107,7 +105,7 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id) {
switch (command_id) {
case NAME: {
- browser_->OpenURL(extension->GalleryUrl(), GURL(),
+ browser_->OpenURL(extension->GetHomepageURL(), GURL(),
NEW_FOREGROUND_TAB, PageTransition::LINK);
break;
}