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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_util.cc

Issue 296593003: Make various string_util functions take StringPieces instead of char[]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resync Created 6 years, 7 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/browser/safe_browsing/safe_browsing_util.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc
index 03346378b39138e5c4968c79978cd0ff27e90e91..4b04c66f3ee1fa1a4e23fd5ad1f17637b7101269 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_util.cc
@@ -335,9 +335,8 @@ void CanonicalizeUrl(const GURL& url,
(parsed.host.len > 0)
? url_unescaped_str.substr(parsed.host.begin, parsed.host.len)
: std::string();
- const char kCharsToTrim[] = ".";
std::string host_without_end_dots;
- base::TrimString(host, kCharsToTrim, &host_without_end_dots);
+ base::TrimString(host, ".", &host_without_end_dots);
// 4. In hostname, replace consecutive dots with a single dot.
std::string host_without_consecutive_dots(RemoveConsecutiveChars(
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu.cc ('k') | chrome/browser/ui/omnibox/location_bar_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698