Chromium Code Reviews

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 23549039: Preparing to support fragment resolution against non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Not updating the net tests Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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 6933f9e0b1de14ec97c9d33b3abd649a85e4acc2..53b3dfc01bbcf87fccc39c9981ad3c806af0247f 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -396,7 +396,7 @@ void ChildProcessSecurityPolicyImpl::GrantRequestURL(
// view-source:http://www.google.com/a
// In order to request these URLs, the child_id needs to be able to
// request the embedded URL.
- GrantRequestURL(child_id, GURL(url.path()));
+ GrantRequestURL(child_id, GURL(url.GetContent()));
}
return; // Can't grant the capability to request pseudo schemes.
@@ -586,7 +586,7 @@ bool ChildProcessSecurityPolicyImpl::CanRequestURL(
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());
+ GURL child_url(url.GetContent());
if (child_url.SchemeIs(kViewSourceScheme) &&
url.SchemeIs(kViewSourceScheme))
return false;

Powered by Google App Engine