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

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

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan Created 4 years, 1 month 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 a222bd3f2d6bd395640fbb018a01d5b7cba39ddf..ecf7d5bf97fac8573229779b471606a08a55f976 100644
--- a/components/dom_distiller/core/page_features.cc
+++ b/components/dom_distiller/core/page_features.cc
@@ -70,7 +70,7 @@ std::vector<double> CalculateDerivedFeatures(bool isOGArticle,
const std::string& innerHTML) {
// In the training pipeline, the strings are explicitly encoded in utf-8 (as
// they are here).
- const std::string& path = url.path();
+ const std::string& path = url.path().as_string();
int innerTextWords = GetWordCount(innerText);
int textContentWords = GetWordCount(textContent);
int innerHTMLWords = GetWordCount(innerHTML);
@@ -196,7 +196,7 @@ std::vector<double> CalculateDerivedFeatures(
double mozScore,
double mozScoreAllSqrt,
double mozScoreAllLinear) {
- const std::string& path = url.path();
+ const std::string& path = url.path().as_string();
std::vector<double> features;
// 'opengraph', opengraph,
features.push_back(openGraph);
« no previous file with comments | « components/content_settings/core/common/content_settings_pattern.cc ('k') | components/domain_reliability/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698