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

Unified Diff: extensions/common/matcher/url_matcher.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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: extensions/common/matcher/url_matcher.cc
diff --git a/extensions/common/matcher/url_matcher.cc b/extensions/common/matcher/url_matcher.cc
index d7779a259206ccfb551d0d23bad92402e121a157..b5992930c58d9ae6f54b1a761d6e0144a2e4ca4c 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(
« no previous file with comments | « extensions/common/matcher/substring_set_matcher_unittest.cc ('k') | extensions/common/matcher/url_matcher_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698