diff --git a/url/origin.cc b/url/origin.cc index c2dee8868a4ef9..0686e0525f0e79 100644 --- a/url/origin.cc +++ b/url/origin.cc @@ -43,7 +43,7 @@ Origin Origin::Create(const GURL& url) { // It's SchemeHostPort's responsibility to filter out unrecognized schemes; // sanity check that this is happening. DCHECK(tuple.IsInvalid() || url.IsStandard() || - base::ContainsValue(GetLocalSchemes(), url.scheme_piece()) || + base::Contains(GetLocalSchemes(), url.scheme_piece()) || AllowNonStandardSchemesForAndroidWebView()); } @@ -162,7 +162,7 @@ bool Origin::CanBeDerivedFrom(const GURL& url) const { // For "no access" schemes, blink's SecurityOrigin will always create an // opaque unique one. However, about: scheme is also registered as such but // does not behave this way, therefore exclude it from this check. - if (base::ContainsValue(url::GetNoAccessSchemes(), url.scheme()) && + if (base::Contains(url::GetNoAccessSchemes(), url.scheme()) && !url.SchemeIs(kAboutScheme)) { // If |this| is not opaque, definitely return false as the expectation // is for opaque origin. diff --git a/url/scheme_host_port.cc b/url/scheme_host_port.cc index 6af849fe6bd28d..18b0e8cd6075df 100644 --- a/url/scheme_host_port.cc +++ b/url/scheme_host_port.cc @@ -68,8 +68,7 @@ bool IsValidInput(const base::StringPiece& scheme, // // TODO: Migrate "content:" and "externalfile:" to be standard schemes, and // remove this local scheme exception. - if (base::ContainsValue(GetLocalSchemes(), scheme) && host.empty() && - port == 0) + if (base::Contains(GetLocalSchemes(), scheme) && host.empty() && port == 0) return true; // Otherwise, allow non-standard schemes only if the Android WebView