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

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: 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
« no previous file with comments | « chrome/common/child_process_logging_posix.cc ('k') | chrome/common/content_settings_pattern.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/common/child_process_logging_posix.cc ('k') | chrome/common/content_settings_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698