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

Unified Diff: components/history/core/browser/top_sites_cache.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
« no previous file with comments | « components/domain_reliability/util.cc ('k') | components/history/core/browser/web_history_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/top_sites_cache.cc
diff --git a/components/history/core/browser/top_sites_cache.cc b/components/history/core/browser/top_sites_cache.cc
index c436e68cb0e73871d5f41e1131f0a1f2bfd23801..20fb227e528c3822d6db46c3b13b906167ca8143 100644
--- a/components/history/core/browser/top_sites_cache.cc
+++ b/components/history/core/browser/top_sites_cache.cc
@@ -93,7 +93,8 @@ GURL TopSitesCache::GetGeneralizedCanonicalURL(const GURL& url) const {
return GURL::EmptyGURL();
GURL compare_url_lo(GetURLFromIterator(it_lo));
if (!HaveSameSchemeHostAndPort(base_url, compare_url_lo) ||
- !IsPathPrefix(base_url.path(), compare_url_lo.path())) {
+ !IsPathPrefix(base_url.path().as_string(),
+ compare_url_lo.path().as_string())) {
return GURL::EmptyGURL();
}
// Everything before |it_lo| is irrelevant.
@@ -104,7 +105,7 @@ GURL TopSitesCache::GetGeneralizedCanonicalURL(const GURL& url) const {
--it;
GURL compare_url(GetURLFromIterator(it));
DCHECK(HaveSameSchemeHostAndPort(compare_url, url));
- if (IsPathPrefix(compare_url.path(), url.path()))
+ if (IsPathPrefix(compare_url.path().as_string(), url.path().as_string()))
return it->first.first->url;
}
« no previous file with comments | « components/domain_reliability/util.cc ('k') | components/history/core/browser/web_history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698