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

Unified Diff: chrome/browser/ui/app_list/extension_app_item.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/ui/app_list/extension_app_item.cc
diff --git a/chrome/browser/ui/app_list/extension_app_item.cc b/chrome/browser/ui/app_list/extension_app_item.cc
index 817fdad8364587752ca78a5f52a79980d9dc556d..e451d14aa36a1347d8e4a3f2a1cca26e0689a1f2 100644
--- a/chrome/browser/ui/app_list/extension_app_item.cc
+++ b/chrome/browser/ui/app_list/extension_app_item.cc
@@ -23,6 +23,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
+#include "chrome/common/extensions/manifest_url_info.h"
#include "content/public/common/context_menu_params.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -267,9 +268,10 @@ void ExtensionAppItem::ShowExtensionOptions() {
if (!extension)
return;
- chrome::NavigateParams params(profile_,
- extension->options_url(),
- content::PAGE_TRANSITION_LINK);
+ chrome::NavigateParams params(
+ profile_,
+ extensions::ManifestURLInfo::GetOptionsPage(extension),
+ content::PAGE_TRANSITION_LINK);
chrome::Navigate(&params);
}
@@ -337,7 +339,7 @@ bool ExtensionAppItem::IsCommandIdEnabled(int command_id) const {
} else if (command_id == OPTIONS) {
const Extension* extension = GetExtension();
return IsExtensionEnabled(profile_, extension_id_) && extension &&
- !extension->options_url().is_empty();
+ !extensions::ManifestURLInfo::GetOptionsPage(extension).is_empty();
} else if (command_id == UNINSTALL) {
const Extension* extension = GetExtension();
const extensions::ManagementPolicy* policy =

Powered by Google App Engine
This is Rietveld 408576698