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

Unified Diff: chrome/browser/extensions/extension_context_menu_model.cc

Issue 11726002: Move the parsing of 'update_url' & 'options_page' URLs out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: fixed HomepageURLManifestTest.GetHomepageURL Created 7 years, 11 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/extensions/extension_context_menu_model.cc
diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc
index 0b45469c6d4701c3ebe4ec392d9caee3379af831..39df2510817609c824cb0dbac0382a69e9b2ca50 100644
--- a/chrome/browser/extensions/extension_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_context_menu_model.cc
@@ -70,7 +70,8 @@ bool ExtensionContextMenuModel::IsCommandIdEnabled(int command_id) const {
return false;
if (command_id == CONFIGURE) {
- return extension->options_url().spec().length() > 0;
+ return
+ extensions::ManifestURL::GetOptionsPage(extension).spec().length() > 0;
} else if (command_id == NAME) {
// The NAME links to the Homepage URL. If the extension doesn't have a
// homepage, we just disable this menu item.
@@ -109,7 +110,7 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id) {
break;
}
case CONFIGURE:
- DCHECK(!extension->options_url().is_empty());
+ DCHECK(!extensions::ManifestURL::GetOptionsPage(extension).is_empty());
extensions::ExtensionSystem::Get(profile_)->process_manager()->
OpenOptionsPage(extension, browser_);
break;
« no previous file with comments | « chrome/browser/extensions/api/management/management_api.cc ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698