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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm

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/ui/cocoa/extensions/extension_action_context_menu.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm
index f9ca1f826f51c2b7425e8706ba4283f8507020d0..88244f8692d9a394ac80dc618fac0d9023600ac7 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm
@@ -29,6 +29,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
+#include "chrome/common/extensions/manifest_url_handler.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_details.h"
@@ -204,7 +205,7 @@ enum {
break;
}
case kExtensionContextOptions: {
- DCHECK(!extension_->options_url().is_empty());
+ DCHECK(!extensions::ManifestURL::GetOptionsPage(extension_).is_empty());
extensions::ExtensionSystem::Get(browser_->profile())->process_manager()->
OpenOptionsPage(extension_, browser_);
break;
@@ -273,7 +274,8 @@ enum {
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem {
if ([menuItem tag] == kExtensionContextOptions) {
// Disable 'Options' if there are no options to set.
- return extension_->options_url().spec().length() > 0;
+ return extensions::ManifestURL::
+ GetOptionsPage(extension_).spec().length() > 0;
}
return YES;
}
« no previous file with comments | « chrome/browser/ui/app_list/extension_app_item.cc ('k') | chrome/browser/ui/extensions/application_launch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698