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

Unified Diff: chrome/common/extensions/url_pattern.cc

Issue 10174001: Add an API for hosted apps to check their install and running states. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/common/extensions/url_pattern.cc
diff --git a/chrome/common/extensions/url_pattern.cc b/chrome/common/extensions/url_pattern.cc
index c0b04b7cf6eceb963b0693720c35d305849e8300..c77e61c8082c88fc900b32a5a8e9049738af7074 100644
--- a/chrome/common/extensions/url_pattern.cc
+++ b/chrome/common/extensions/url_pattern.cc
@@ -378,10 +378,9 @@ bool URLPattern::MatchesHost(const GURL& test) const {
}
bool URLPattern::MatchesPath(const std::string& test) const {
- if (!MatchPattern(test, path_escaped_))
- return false;
-
- return true;
+ return MatchPattern(test, path_escaped_) ||
+ MatchPattern(test + '/', path_escaped_) ||
+ MatchPattern(test, path_escaped_ + '/');
jstritar 2012/04/22 17:57:31 I did this because some apps, like Google Finance,
miket_OOO 2012/04/23 22:11:16 I'd prefer to force developers to get it exactly r
jstritar 2012/04/23 23:46:12 Agreed... if we do any fuzzy matching it probably
}
bool URLPattern::MatchesPort(int port) const {

Powered by Google App Engine
This is Rietveld 408576698