summaryrefslogtreecommitdiffstats
path: root/extensions/common/matcher/url_matcher.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/common/matcher/url_matcher.cc')
-rw-r--r--extensions/common/matcher/url_matcher.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/common/matcher/url_matcher.cc b/extensions/common/matcher/url_matcher.cc
index d7779a2..b599293 100644
--- a/extensions/common/matcher/url_matcher.cc
+++ b/extensions/common/matcher/url_matcher.cc
@@ -256,8 +256,8 @@ URLMatcherConditionFactory::~URLMatcherConditionFactory() {
std::string URLMatcherConditionFactory::CanonicalizeURLForComponentSearches(
const GURL& url) const {
return kBeginningOfURL + CanonicalizeHostname(url.host()) + kEndOfDomain +
- url.path() + kEndOfPath + (url.has_query() ? "?" + url.query() : "") +
- kEndOfURL;
+ url.path() + kEndOfPath +
+ (url.has_query() ? "?" + url.query() : std::string()) + kEndOfURL;
}
URLMatcherCondition URLMatcherConditionFactory::CreateHostPrefixCondition(