| Index: components/content_settings/core/common/content_settings_pattern.cc
|
| diff --git a/components/content_settings/core/common/content_settings_pattern.cc b/components/content_settings/core/common/content_settings_pattern.cc
|
| index c86044ef639783a0e769bf69be8f0cffe5ca2c63..a8d87979e405ca6f5888d852349b57425c758746 100644
|
| --- a/components/content_settings/core/common/content_settings_pattern.cc
|
| +++ b/components/content_settings/core/common/content_settings_pattern.cc
|
| @@ -233,7 +233,7 @@ bool ContentSettingsPattern::Builder::Canonicalize(PatternParts* parts) {
|
| !parts->is_path_wildcard) {
|
| GURL url(std::string(url::kFileScheme) +
|
| std::string(url::kStandardSchemeSeparator) + parts->path);
|
| - parts->path = url.path();
|
| + parts->path = url.path().as_string();
|
| }
|
|
|
| // Canonicalize the host part.
|
| @@ -391,7 +391,8 @@ ContentSettingsPattern ContentSettingsPattern::FromURL(
|
| local_url = url.inner_url();
|
| }
|
| if (local_url->SchemeIsFile()) {
|
| - builder->WithScheme(local_url->scheme())->WithPath(local_url->path());
|
| + builder->WithScheme(local_url->scheme())
|
| + ->WithPath(local_url->path().as_string());
|
| } else {
|
| // Please keep the order of the ifs below as URLs with an IP as host can
|
| // also have a "http" scheme.
|
| @@ -429,7 +430,8 @@ ContentSettingsPattern ContentSettingsPattern::FromURLNoWildcard(
|
| local_url = url.inner_url();
|
| }
|
| if (local_url->SchemeIsFile()) {
|
| - builder->WithScheme(local_url->scheme())->WithPath(local_url->path());
|
| + builder->WithScheme(local_url->scheme())
|
| + ->WithPath(local_url->path().as_string());
|
| } else {
|
| builder->WithScheme(local_url->scheme())->WithHost(local_url->host());
|
| if (local_url->port().empty()) {
|
| @@ -558,7 +560,7 @@ bool ContentSettingsPattern::Matches(
|
| // inside the filesystem scheme. Investigate and fix.
|
| if (!parts_.is_scheme_wildcard && scheme == url::kFileScheme)
|
| return parts_.is_path_wildcard ||
|
| - parts_.path == std::string(local_url->path());
|
| + parts_.path == std::string(local_url->path().as_string());
|
|
|
| // Match the host part.
|
| const std::string host(net::TrimEndingDot(local_url->host()));
|
|
|