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

Unified Diff: chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc

Issue 102843002: Move RemoveChars, ReplaceChars, TrimString, and TruncateUTF8ToByteSize to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/renderer/safe_browsing/phishing_url_feature_extractor.cc
diff --git a/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc b/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
index 11d85685ed63afece82555581070097fa74f5300..e35363638e3126c57345db537db04c4c7c650241 100644
--- a/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
+++ b/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
@@ -30,8 +30,9 @@ bool PhishingUrlFeatureExtractor::ExtractFeatures(const GURL& url,
if (!features->AddBooleanFeature(features::kUrlHostIsIpAddress))
return false;
} else {
+ // Remove any leading/trailing dots.
std::string host;
- TrimString(url.host(), ".", &host); // Remove any leading/trailing dots.
+ base::TrimString(url.host(), ".", &host);
// TODO(bryner): Ensure that the url encoding is consistent with
// the features in the model.

Powered by Google App Engine
This is Rietveld 408576698