summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_context_menu_api.cc
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:25:31 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:25:31 +0000
commit542258c2719723200e46a45fdd7dc571ed5b90cf (patch)
tree5a7754d98ef347c17328696e62ec93bde6738d89 /chrome/browser/extensions/extension_context_menu_api.cc
parent7b1c0376a17429471d2163c31ed4dbb05a9e819f (diff)
downloadchromium_src-542258c2719723200e46a45fdd7dc571ed5b90cf.zip
chromium_src-542258c2719723200e46a45fdd7dc571ed5b90cf.tar.gz
chromium_src-542258c2719723200e46a45fdd7dc571ed5b90cf.tar.bz2
Give a helpful warning message if a url patern contains a port.
BUG=32160 TEST=ExtensionURLPatternTest.Ports,ExtensionManifestTest.* Review URL: http://codereview.chromium.org/2835034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_context_menu_api.cc')
-rw-r--r--chrome/browser/extensions/extension_context_menu_api.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_context_menu_api.cc b/chrome/browser/extensions/extension_context_menu_api.cc
index 78f4f03..d8e93f2 100644
--- a/chrome/browser/extensions/extension_context_menu_api.cc
+++ b/chrome/browser/extensions/extension_context_menu_api.cc
@@ -138,7 +138,10 @@ bool ExtensionContextMenuFunction::ParseURLPatterns(
return false;
URLPattern pattern(ExtensionMenuManager::kAllowedSchemes);
- if (URLPattern::PARSE_SUCCESS != pattern.Parse(tmp)) {
+ // TODO(skerner): Consider enabling strict pattern parsing
+ // if this extension's location indicates that it is under development.
+ if (URLPattern::PARSE_SUCCESS != pattern.Parse(tmp,
+ URLPattern::PARSE_LENIENT)) {
error_ = ExtensionErrorUtils::FormatErrorMessage(kInvalidURLPatternError,
tmp);
return false;