summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorkristianm@chromium.org <kristianm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-24 19:05:17 +0000
committerkristianm@chromium.org <kristianm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-24 19:05:17 +0000
commit5f50c5dbbad30f25ee6f983f555237c3f4e0a1a3 (patch)
tree91055362c58de7699dea1022efe8ca9732f7c01d /chrome_frame
parent22abbd82c93a9c85f2364586919a6e3485586bcc (diff)
downloadchromium_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 'chrome_frame')
-rw-r--r--chrome_frame/navigation_constraints.cc2
-rw-r--r--chrome_frame/utils.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/chrome_frame/navigation_constraints.cc b/chrome_frame/navigation_constraints.cc
index 59efb0e..18d8d9d 100644
--- a/chrome_frame/navigation_constraints.cc
+++ b/chrome_frame/navigation_constraints.cc
@@ -32,7 +32,7 @@ bool NavigationConstraintsImpl::IsSchemeAllowed(const GURL& url) {
// Additional checking for view-source. Allow only http and https
// URLs in view source.
if (url.SchemeIs(content::kViewSourceScheme)) {
- GURL sub_url(url.path());
+ GURL sub_url(url.GetContent());
if (sub_url.SchemeIs(content::kHttpScheme) ||
sub_url.SchemeIs(content::kHttpsScheme))
return true;
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index 7c8b713..a00f503 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -1009,7 +1009,7 @@ bool IsValidUrlScheme(const GURL& url, bool is_privileged) {
// Additional checking for view-source. Allow only http and https
// URLs in view source.
if (url.SchemeIs(content::kViewSourceScheme)) {
- GURL sub_url(url.path());
+ GURL sub_url(url.GetContent());
if (sub_url.SchemeIs(content::kHttpScheme) ||
sub_url.SchemeIs(content::kHttpsScheme))
return true;