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

Unified Diff: chrome/common/content_settings_pattern.cc

Issue 23112033: content: Move kHttpsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months 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/common/content_settings_pattern.cc
diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc
index 01860c523b134d3de76def696a4028400a73ad91..d5e971ca0a1ef6cccb37e4910bd69811acd3c392 100644
--- a/chrome/common/content_settings_pattern.cc
+++ b/chrome/common/content_settings_pattern.cc
@@ -24,7 +24,7 @@ namespace {
std::string GetDefaultPort(const std::string& scheme) {
if (scheme == chrome::kHttpScheme)
return "80";
- if (scheme == chrome::kHttpsScheme)
+ if (scheme == content::kHttpsScheme)
return "443";
return std::string();
}
@@ -244,7 +244,7 @@ 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(chrome::kHttpScheme) &&
- parts.scheme != std::string(chrome::kHttpsScheme)) {
+ parts.scheme != std::string(content::kHttpsScheme)) {
return false;
}
return true;
@@ -279,7 +279,7 @@ bool ContentSettingsPattern::Builder::LegacyValidate(
// Test if the scheme is supported or a wildcard.
if (!parts.is_scheme_wildcard &&
parts.scheme != std::string(chrome::kHttpScheme) &&
- parts.scheme != std::string(chrome::kHttpsScheme)) {
+ parts.scheme != std::string(content::kHttpsScheme)) {
return false;
}
return true;
@@ -342,15 +342,15 @@ ContentSettingsPattern ContentSettingsPattern::FromURL(
} else if (local_url->SchemeIs(chrome::kHttpScheme)) {
builder->WithSchemeWildcard()->WithDomainWildcard()->WithHost(
local_url->host());
- } else if (local_url->SchemeIs(chrome::kHttpsScheme)) {
+ } else if (local_url->SchemeIs(content::kHttpsScheme)) {
builder->WithScheme(local_url->scheme())->WithDomainWildcard()->WithHost(
local_url->host());
} else {
// Unsupported scheme
}
if (local_url->port().empty()) {
- if (local_url->SchemeIs(chrome::kHttpsScheme))
- builder->WithPort(GetDefaultPort(chrome::kHttpsScheme));
+ if (local_url->SchemeIs(content::kHttpsScheme))
+ builder->WithPort(GetDefaultPort(content::kHttpsScheme));
else
builder->WithPortWildcard();
} else {
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service_unittest.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698