summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 23:24:51 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 23:24:51 +0000
commit29f5f29ee1dad4d91b73d4b3d59cdcb5c2aeb983 (patch)
tree91201a8a24c1977712cb693e08ec79190e26fc8e /chrome/browser/extensions
parentd13f51bc832e8e7965e92f5aa4b16b8c10c3f913 (diff)
downloadchromium_src-29f5f29ee1dad4d91b73d4b3d59cdcb5c2aeb983.zip
chromium_src-29f5f29ee1dad4d91b73d4b3d59cdcb5c2aeb983.tar.gz
chromium_src-29f5f29ee1dad4d91b73d4b3d59cdcb5c2aeb983.tar.bz2
Revert 45749 - (missing test fix)
Link the name of the extension on the management page to the gallery page, if the extension is from the gallery. BUG=29739 TEST=Install a gallery extension and a thirdparty extension and make sure the gallery extension name is a link (whereas the third party extension name is static text). Review URL: http://codereview.chromium.org/1792006 TBR=finnur@chromium.org Review URL: http://codereview.chromium.org/1807001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_context_menu_model.cc7
-rw-r--r--chrome/browser/extensions/extensions_ui.cc7
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc
index a13361c..0878de9 100644
--- a/chrome/browser/extensions/extension_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_context_menu_model.cc
@@ -74,7 +74,7 @@ bool ExtensionContextMenuModel::IsCommandIdEnabled(int command_id) const {
// 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();
+ return extension_->update_url().DomainIs("google.com");
} else if (command_id == INSPECT_POPUP) {
TabContents* contents = browser_->GetSelectedTabContents();
if (!contents)
@@ -93,8 +93,9 @@ bool ExtensionContextMenuModel::GetAcceleratorForCommandId(
void ExtensionContextMenuModel::ExecuteCommand(int command_id) {
switch (command_id) {
case NAME: {
- browser_->OpenURL(extension_->GalleryUrl(), GURL(),
- NEW_FOREGROUND_TAB, PageTransition::LINK);
+ GURL url(std::string(extension_urls::kGalleryBrowsePrefix) +
+ std::string("/detail/") + extension_->id());
+ browser_->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
break;
}
case CONFIGURE:
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index 9565d69..75b54e6 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -752,7 +752,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
if (!extension->options_url().is_empty())
extension_data->SetString(L"options_url", extension->options_url().spec());
- // Add list of content_script detail DictionaryValues.
+ // Add list of content_script detail DictionaryValues
ListValue *content_script_list = new ListValue();
UserScriptList content_scripts = extension->content_scripts();
for (UserScriptList::const_iterator script = content_scripts.begin();
@@ -762,7 +762,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
}
extension_data->Set(L"content_scripts", content_script_list);
- // Add permissions.
+ // Add permissions
ListValue *permission_list = new ListValue;
std::vector<URLPattern> permissions = extension->host_permissions();
for (std::vector<URLPattern>::iterator permission = permissions.begin();
@@ -778,7 +778,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
iter != pages.end(); ++iter) {
DictionaryValue* view_value = new DictionaryValue;
view_value->SetString(L"path",
- iter->url.path().substr(1, std::string::npos)); // No leading slash.
+ iter->url.path().substr(1, std::string::npos)); // no leading slash
view_value->SetInteger(L"renderViewId", iter->render_view_id);
view_value->SetInteger(L"renderProcessId", iter->render_process_id);
views->Append(view_value);
@@ -786,7 +786,6 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
extension_data->Set(L"views", views);
extension_data->SetBoolean(L"hasPopupAction",
extension->browser_action() || extension->page_action());
- extension_data->SetString(L"galleryUrl", extension->GalleryUrl().spec());
return extension_data;
}