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

Unified Diff: components/dom_distiller/core/page_features.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: components/dom_distiller/core/page_features.cc
diff --git a/components/dom_distiller/core/page_features.cc b/components/dom_distiller/core/page_features.cc
index 7d3115c597b3d4ecfa927cac3fbe3acadfcb8bbd..f931bbe5cb23cdc75513005d00cac20c84b92b93 100644
--- a/components/dom_distiller/core/page_features.cc
+++ b/components/dom_distiller/core/page_features.cc
@@ -16,6 +16,7 @@ namespace dom_distiller {
*/
namespace {
+
std::string GetLastSegment(const std::string& path) {
// return re.search('[^/]*\/?$', path).group(0)
if (path.size() == 0)
@@ -46,7 +47,8 @@ bool EndsWith(const std::string& t, const std::string& s) {
return s.size() >= t.size() &&
s.compare(s.size() - t.size(), std::string::npos, t) == 0;
}
-}
+
+} // namespace
int kDerivedFeaturesCount = 29;
@@ -176,4 +178,5 @@ std::vector<double> CalculateDerivedFeaturesFromJSON(
numAnchors, numForms, innerText, textContent,
innerHTML);
}
-}
+
+} // namespace dom_distiller
« no previous file with comments | « components/devtools_http_handler/devtools_http_handler.cc ('k') | components/google/core/browser/google_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698