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

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: Created 8 years 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 d4eae56ad4544fd6db787069796b9cc8ed9a5043..572302d8164cba831ebd7b839a628cae5ade98b9 100644
--- a/chrome/browser/extensions/extension_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_context_menu_model.cc
@@ -71,7 +71,7 @@ bool ExtensionContextMenuModel::IsCommandIdEnabled(int command_id) const {
return false;
if (command_id == CONFIGURE) {
- return extension->options_url().spec().length() > 0;
+ return ManifestURLInfo::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.
@@ -110,7 +110,7 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id) {
break;
}
case CONFIGURE:
- DCHECK(!extension->options_url().is_empty());
+ DCHECK(!ManifestURLInfo::GetOptionsPage(extension).is_empty());
extensions::ExtensionSystem::Get(profile_)->process_manager()->
OpenOptionsPage(extension, browser_);
break;

Powered by Google App Engine
This is Rietveld 408576698