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

Unified Diff: chrome/common/content_settings_pattern.cc

Issue 120593003: Move kFileScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « chrome/browser/web_applications/web_app.cc ('k') | chrome/common/content_settings_pattern_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/content_settings_pattern.cc
diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc
index 34272b08f8bcb58aabdf48a8dbd8c46ddedbcf4f..4f49a676f24738c731c76385a8f510b931c74277 100644
--- a/chrome/common/content_settings_pattern.cc
+++ b/chrome/common/content_settings_pattern.cc
@@ -179,9 +179,9 @@ bool ContentSettingsPattern::Builder::Canonicalize(PatternParts* parts) {
const std::string scheme(StringToLowerASCII(parts->scheme));
parts->scheme = scheme;
- if (parts->scheme == std::string(chrome::kFileScheme) &&
+ if (parts->scheme == std::string(content::kFileScheme) &&
!parts->is_path_wildcard) {
- GURL url(std::string(chrome::kFileScheme) +
+ GURL url(std::string(content::kFileScheme) +
std::string(content::kStandardSchemeSeparator) + parts->path);
parts->path = url.path();
}
@@ -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(chrome::kFileScheme)) {
+ if (parts.scheme == std::string(content::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(chrome::kFileScheme) &&
+ if (parts.scheme == std::string(content::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 == chrome::kFileScheme)
+ if (!parts_.is_scheme_wildcard && scheme == content::kFileScheme)
return parts_.is_path_wildcard ||
parts_.path == std::string(local_url->path());
« no previous file with comments | « chrome/browser/web_applications/web_app.cc ('k') | chrome/common/content_settings_pattern_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698