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

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 15950011: content: Move kViewSourceScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: content/browser/child_process_security_policy_impl.cc
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index 89c8efe72d21a3661e55bc6ab75704f60486dc60..6fed71fdddc8f01be3c229522cc163b87774163f 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -270,7 +270,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() {
// We know about the following pseudo schemes and treat them specially.
RegisterPseudoScheme(chrome::kAboutScheme);
RegisterPseudoScheme(chrome::kJavaScriptScheme);
- RegisterPseudoScheme(chrome::kViewSourceScheme);
+ RegisterPseudoScheme(kViewSourceScheme);
}
ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() {
@@ -369,7 +369,7 @@ void ChildProcessSecurityPolicyImpl::GrantRequestURL(
if (IsPseudoScheme(url.scheme())) {
// The view-source scheme is a special case of a pseudo-URL that eventually
// results in requesting its embedded URL.
- if (url.SchemeIs(chrome::kViewSourceScheme)) {
+ if (url.SchemeIs(kViewSourceScheme)) {
// URLs with the view-source scheme typically look like:
// view-source:http://www.google.com/a
// In order to request these URLs, the child_id needs to be able to
@@ -536,12 +536,12 @@ bool ChildProcessSecurityPolicyImpl::CanRequestURL(
if (IsPseudoScheme(url.scheme())) {
// There are a number of special cases for pseudo schemes.
- if (url.SchemeIs(chrome::kViewSourceScheme)) {
+ if (url.SchemeIs(kViewSourceScheme)) {
// A view-source URL is allowed if the child process is permitted to
// request the embedded URL. Careful to avoid pointless recursion.
GURL child_url(url.path());
- if (child_url.SchemeIs(chrome::kViewSourceScheme) &&
- url.SchemeIs(chrome::kViewSourceScheme))
+ if (child_url.SchemeIs(kViewSourceScheme) &&
+ url.SchemeIs(kViewSourceScheme))
return false;
return CanRequestURL(child_id, child_url);
« no previous file with comments | « content/browser/browser_url_handler_impl.cc ('k') | content/browser/child_process_security_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698