diff options
author | kristianm@chromium.org <kristianm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 19:05:17 +0000 |
---|---|---|
committer | kristianm@chromium.org <kristianm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 19:05:17 +0000 |
commit | 5f50c5dbbad30f25ee6f983f555237c3f4e0a1a3 (patch) | |
tree | 91055362c58de7699dea1022efe8ca9732f7c01d /content | |
parent | 22abbd82c93a9c85f2364586919a6e3485586bcc (diff) | |
download | chromium_src-5f50c5dbbad30f25ee6f983f555237c3f4e0a1a3.zip chromium_src-5f50c5dbbad30f25ee6f983f555237c3f4e0a1a3.tar.gz chromium_src-5f50c5dbbad30f25ee6f983f555237c3f4e0a1a3.tar.bz2 |
Preparing to support fragment resolution against non-hierarchical schemes
Adds a new GURL::GetContent() to retrieve the text after scheme: specifically
intended for use in non-hierarchical schemes (data: etc).
Doing the first part of https://codereview.chromium.org/23835019/
in a preparation CL.
BUG=291747
Review URL: https://codereview.chromium.org/23549039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/browser_url_handler_impl.cc | 2 | ||||
-rw-r--r-- | content/browser/child_process_security_policy_impl.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/content/browser/browser_url_handler_impl.cc b/content/browser/browser_url_handler_impl.cc index e642e1f..d22b88f 100644 --- a/content/browser/browser_url_handler_impl.cc +++ b/content/browser/browser_url_handler_impl.cc @@ -19,7 +19,7 @@ namespace content { static bool HandleViewSource(GURL* url, BrowserContext* browser_context) { if (url->SchemeIs(kViewSourceScheme)) { // Load the inner URL instead. - *url = GURL(url->path()); + *url = GURL(url->GetContent()); // Bug 26129: limit view-source to view the content and not any // other kind of 'active' url scheme like 'javascript' or 'data'. diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc index 5e069c4..b8433c0 100644 --- a/content/browser/child_process_security_policy_impl.cc +++ b/content/browser/child_process_security_policy_impl.cc @@ -391,7 +391,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. @@ -572,7 +572,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; |