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

Unified Diff: extensions/common/url_pattern.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 7 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
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | extensions/common/url_pattern_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/url_pattern.cc
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index 020be3c40dfb4b64cab952257bc90cfddcc9271e..885eab961b4cbc370595aca8433e5eb7a48dab9d 100644
--- a/extensions/common/url_pattern.cc
+++ b/extensions/common/url_pattern.cc
@@ -22,11 +22,11 @@ namespace {
const char* kValidSchemes[] = {
url::kHttpScheme,
url::kHttpsScheme,
- content::kFileScheme,
- content::kFtpScheme,
+ url::kFileScheme,
+ url::kFtpScheme,
content::kChromeUIScheme,
extensions::kExtensionScheme,
- content::kFileSystemScheme,
+ url::kFileSystemScheme,
};
const int kValidSchemeMasks[] = {
@@ -192,7 +192,7 @@ URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) {
if (!standard_scheme) {
path_start_pos = host_start_pos;
- } else if (scheme_ == content::kFileScheme) {
+ } else if (scheme_ == url::kFileScheme) {
size_t host_end_pos = pattern.find(kPathSeparator, host_start_pos);
if (host_end_pos == std::string::npos) {
// Allow hostname omission.
@@ -426,7 +426,7 @@ const std::string& URLPattern::GetAsString() const {
std::string spec = scheme_ +
(standard_scheme ? content::kStandardSchemeSeparator : ":");
- if (scheme_ != content::kFileScheme && standard_scheme) {
+ if (scheme_ != url::kFileScheme && standard_scheme) {
if (match_subdomains_) {
spec += "*";
if (!host_.empty())
@@ -493,7 +493,7 @@ bool URLPattern::MatchesAllSchemes(
bool URLPattern::MatchesSecurityOriginHelper(const GURL& test) const {
// Ignore hostname if scheme is file://.
- if (scheme_ != content::kFileScheme && !MatchesHost(test))
+ if (scheme_ != url::kFileScheme && !MatchesHost(test))
return false;
if (!MatchesPortPattern(base::IntToString(test.EffectiveIntPort())))
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | extensions/common/url_pattern_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698