| Index: chrome/common/content_settings_pattern.cc
|
| diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc
|
| index 4f49a676f24738c731c76385a8f510b931c74277..3dfa1adf62f5bc531d17d19a131519a00dc0c2ea 100644
|
| --- a/chrome/common/content_settings_pattern.cc
|
| +++ b/chrome/common/content_settings_pattern.cc
|
| @@ -16,15 +16,16 @@
|
| #include "ipc/ipc_message_utils.h"
|
| #include "net/base/dns_util.h"
|
| #include "net/base/net_util.h"
|
| +#include "net/base/url_constants.h"
|
| #include "url/gurl.h"
|
| #include "url/url_canon.h"
|
|
|
| namespace {
|
|
|
| std::string GetDefaultPort(const std::string& scheme) {
|
| - if (scheme == content::kHttpScheme)
|
| + if (scheme == net::kHttpScheme)
|
| return "80";
|
| - if (scheme == content::kHttpsScheme)
|
| + if (scheme == net::kHttpsScheme)
|
| return "443";
|
| return std::string();
|
| }
|
| @@ -243,8 +244,8 @@ bool ContentSettingsPattern::Builder::Validate(const PatternParts& parts) {
|
|
|
| // Test if the scheme is supported or a wildcard.
|
| if (!parts.is_scheme_wildcard &&
|
| - parts.scheme != std::string(content::kHttpScheme) &&
|
| - parts.scheme != std::string(content::kHttpsScheme)) {
|
| + parts.scheme != std::string(net::kHttpScheme) &&
|
| + parts.scheme != std::string(net::kHttpsScheme)) {
|
| return false;
|
| }
|
| return true;
|
| @@ -278,8 +279,8 @@ bool ContentSettingsPattern::Builder::LegacyValidate(
|
|
|
| // Test if the scheme is supported or a wildcard.
|
| if (!parts.is_scheme_wildcard &&
|
| - parts.scheme != std::string(content::kHttpScheme) &&
|
| - parts.scheme != std::string(content::kHttpsScheme)) {
|
| + parts.scheme != std::string(net::kHttpScheme) &&
|
| + parts.scheme != std::string(net::kHttpsScheme)) {
|
| return false;
|
| }
|
| return true;
|
| @@ -339,18 +340,18 @@ ContentSettingsPattern ContentSettingsPattern::FromURL(
|
| // also have a "http" scheme.
|
| if (local_url->HostIsIPAddress()) {
|
| builder->WithScheme(local_url->scheme())->WithHost(local_url->host());
|
| - } else if (local_url->SchemeIs(content::kHttpScheme)) {
|
| + } else if (local_url->SchemeIs(net::kHttpScheme)) {
|
| builder->WithSchemeWildcard()->WithDomainWildcard()->WithHost(
|
| local_url->host());
|
| - } else if (local_url->SchemeIs(content::kHttpsScheme)) {
|
| + } else if (local_url->SchemeIs(net::kHttpsScheme)) {
|
| builder->WithScheme(local_url->scheme())->WithDomainWildcard()->WithHost(
|
| local_url->host());
|
| } else {
|
| // Unsupported scheme
|
| }
|
| if (local_url->port().empty()) {
|
| - if (local_url->SchemeIs(content::kHttpsScheme))
|
| - builder->WithPort(GetDefaultPort(content::kHttpsScheme));
|
| + if (local_url->SchemeIs(net::kHttpsScheme))
|
| + builder->WithPort(GetDefaultPort(net::kHttpsScheme));
|
| else
|
| builder->WithPortWildcard();
|
| } else {
|
|
|