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

Unified Diff: chrome/common/content_settings_helper.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-run on ToT, revert third_party changes and fix vexing parses. 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: chrome/common/content_settings_helper.cc
diff --git a/chrome/common/content_settings_helper.cc b/chrome/common/content_settings_helper.cc
index 306cbe7c5e16b0167f9ae736784b15d19910a0dd..68e8d4083198376a56be23e6d23eca4e9e26662f 100644
--- a/chrome/common/content_settings_helper.cc
+++ b/chrome/common/content_settings_helper.cc
@@ -12,11 +12,14 @@
namespace content_settings_helper {
std::string OriginToString(const GURL& origin) {
- std::string port_component(origin.IntPort() != url_parse::PORT_UNSPECIFIED ?
- ":" + origin.port() : "");
- std::string scheme_component(!origin.SchemeIs(chrome::kHttpScheme) ?
- origin.scheme() + content::kStandardSchemeSeparator : "");
- return scheme_component + origin.host() + port_component;
+ std::string port_component(origin.IntPort() != url_parse::PORT_UNSPECIFIED
+ ? ":" + origin.port()
+ : std::string());
+ std::string scheme_component(!origin.SchemeIs(chrome::kHttpScheme)
+ ? origin.scheme() +
+ content::kStandardSchemeSeparator
+ : std::string());
+ return scheme_component + origin.host() + port_component;
}
string16 OriginToString16(const GURL& origin) {

Powered by Google App Engine
This is Rietveld 408576698