| Index: chrome/common/content_settings_pattern.cc
|
| diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc
|
| index bfaa66ef26b9a0cfd79eec5c5b88ffbbfc576f70..f0b12a0ce2cde2ed7948472d8210ad32a536b16c 100644
|
| --- a/chrome/common/content_settings_pattern.cc
|
| +++ b/chrome/common/content_settings_pattern.cc
|
| @@ -179,11 +179,11 @@ bool ContentSettingsPattern::Builder::Canonicalize(PatternParts* parts) {
|
| const std::string scheme(StringToLowerASCII(parts->scheme));
|
| parts->scheme = scheme;
|
|
|
| - if (parts->scheme == std::string(content::kFileScheme) &&
|
| + if (parts->scheme == std::string(url::kFileScheme) &&
|
| !parts->is_path_wildcard) {
|
| - GURL url(std::string(content::kFileScheme) +
|
| - std::string(content::kStandardSchemeSeparator) + parts->path);
|
| - parts->path = url.path();
|
| + GURL url(std::string(url::kFileScheme) +
|
| + std::string(content::kStandardSchemeSeparator) + parts->path);
|
| + parts->path = url.path();
|
| }
|
|
|
| // Canonicalize the host part.
|
| @@ -213,7 +213,7 @@ bool ContentSettingsPattern::Builder::Validate(const PatternParts& parts) {
|
| }
|
|
|
| // file:// URL patterns have an empty host and port.
|
| - if (parts.scheme == std::string(content::kFileScheme)) {
|
| + if (parts.scheme == std::string(url::kFileScheme)) {
|
| if (parts.has_domain_wildcard || !parts.host.empty() || !parts.port.empty())
|
| return false;
|
| if (parts.is_path_wildcard)
|
| @@ -254,7 +254,7 @@ bool ContentSettingsPattern::Builder::Validate(const PatternParts& parts) {
|
| bool ContentSettingsPattern::Builder::LegacyValidate(
|
| const PatternParts& parts) {
|
| // If the pattern is for a "file-pattern" test if it is valid.
|
| - if (parts.scheme == std::string(content::kFileScheme) &&
|
| + if (parts.scheme == std::string(url::kFileScheme) &&
|
| !parts.is_scheme_wildcard &&
|
| parts.host.empty() &&
|
| parts.port.empty())
|
| @@ -457,7 +457,7 @@ bool ContentSettingsPattern::Matches(
|
| // TODO(markusheintz): Content settings should be defined for all files on
|
| // a machine. Unless there is a good use case for supporting paths for file
|
| // patterns, stop supporting path for file patterns.
|
| - if (!parts_.is_scheme_wildcard && scheme == content::kFileScheme)
|
| + if (!parts_.is_scheme_wildcard && scheme == url::kFileScheme)
|
| return parts_.is_path_wildcard ||
|
| parts_.path == std::string(local_url->path());
|
|
|
|
|