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

Unified Diff: chrome/browser/supervised_user/supervised_user_url_filter.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: chrome/browser/supervised_user/supervised_user_url_filter.cc
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter.cc b/chrome/browser/supervised_user/supervised_user_url_filter.cc
index 0fd9c7db713c657689335ca0433e3e3e436f7067..808a5b8a0985e9242f099a9d39e573acc29ab005 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
@@ -565,7 +565,8 @@ GURL SupervisedUserURLFilter::GetEmbeddedURL(const GURL& url) const {
if (url.DomainIs(kAmpCacheHost)) {
std::string s;
std::string embedded;
- if (re2::RE2::FullMatch(url.path(), amp_cache_path_regex_, &s, &embedded)) {
+ if (re2::RE2::FullMatch(url.path().as_string(), amp_cache_path_regex_, &s,
+ &embedded)) {
if (url.has_query())
embedded += "?" + url.query();
return BuildURL(!s.empty(), embedded);
@@ -578,8 +579,8 @@ GURL SupervisedUserURLFilter::GetEmbeddedURL(const GURL& url) const {
google_util::DISALLOW_NON_STANDARD_PORTS)) {
std::string s;
std::string embedded;
- if (re2::RE2::FullMatch(url.path(), google_amp_viewer_path_regex_, &s,
- &embedded)) {
+ if (re2::RE2::FullMatch(url.path().as_string(),
+ google_amp_viewer_path_regex_, &s, &embedded)) {
// The embedded URL may be percent-encoded. Undo that.
embedded = net::UnescapeURLComponent(
embedded,

Powered by Google App Engine
This is Rietveld 408576698