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

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 23526048: Support URL fragment resolution againt non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 3 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 0516e1cd573f743c06b85c3f92471216cc014fa2..a1c6830268d5506fdb187a2f3bb2a2bdcb5dc23e 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -394,7 +394,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.Content()));
}
return; // Can't grant the capability to request pseudo schemes.
@@ -584,7 +584,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.Content());
if (child_url.SchemeIs(kViewSourceScheme) &&
url.SchemeIs(kViewSourceScheme))
return false;

Powered by Google App Engine
This is Rietveld 408576698