diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-09 06:41:12 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-09 06:41:12 +0000 |
commit | 69d7f89d6a93e0fbce451960287066195c6d4ea0 (patch) | |
tree | 51c8c1f971d39d652ec38ed76070539bb33e85c7 /chrome/browser/safe_browsing/safe_browsing_util.cc | |
parent | e3748a79b523a8d365d4a33ef986eebb4186fa78 (diff) | |
download | chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.zip chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.gz chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.bz2 |
Revert "Rewrite std::string("") to std::string(), Linux edition."
This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6.
Revert "Fix build after r193020."
This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a.
Revert "Really fix build after r193020."
This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_util.cc')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_util.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc index 7e6710f..ef620a7 100644 --- a/chrome/browser/safe_browsing/safe_browsing_util.cc +++ b/chrome/browser/safe_browsing/safe_browsing_util.cc @@ -298,10 +298,8 @@ void CanonicalizeUrl(const GURL& url, url_unescaped_str.length(), &parsed); // 3. In hostname, remove all leading and trailing dots. - const std::string host = - (parsed.host.len > 0) - ? url_unescaped_str.substr(parsed.host.begin, parsed.host.len) - : std::string(); + const std::string host = (parsed.host.len > 0) ? url_unescaped_str.substr( + parsed.host.begin, parsed.host.len) : ""; const char kCharsToTrim[] = "."; std::string host_without_end_dots; TrimString(host, kCharsToTrim, &host_without_end_dots); @@ -311,11 +309,10 @@ void CanonicalizeUrl(const GURL& url, host_without_end_dots, '.')); // 5. In path, replace runs of consecutive slashes with a single slash. - std::string path = - (parsed.path.len > 0) - ? url_unescaped_str.substr(parsed.path.begin, parsed.path.len) - : std::string(); - std::string path_without_consecutive_slash(RemoveConsecutiveChars(path, '/')); + std::string path = (parsed.path.len > 0) ? url_unescaped_str.substr( + parsed.path.begin, parsed.path.len): ""; + std::string path_without_consecutive_slash(RemoveConsecutiveChars( + path, '/')); url_canon::Replacements<char> hp_replacements; hp_replacements.SetHost(host_without_consecutive_dots.data(), |