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

Unified Diff: content/common/navigation_params.cc

Issue 2644133002: Do not sanitize about:blank/#foo & about:blank?foo (Closed)
Patch Set: Created 3 years, 11 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/common/navigation_params.cc
diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc
index 8921fa80b0c1b7816c7cc8fd4d2e40ac31342c87..fbb6997660c9dc327a76f0da99b599aa63016f63 100644
--- a/content/common/navigation_params.cc
+++ b/content/common/navigation_params.cc
@@ -10,6 +10,7 @@
#include "content/public/common/appcache_info.h"
#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/url_constants.h"
+#include "content/public/common/url_utils.h"
#include "url/gurl.h"
#include "url/url_constants.h"
@@ -23,7 +24,7 @@ bool ShouldMakeNetworkRequestForURL(const GURL& url) {
// to the network stack.
// TODO(clamy): same document navigations should not send requests to the
// network stack. Neither should pushState/popState.
- return url != url::kAboutBlankURL && !url.SchemeIs(url::kJavaScriptScheme) &&
+ return !IsAboutBlankURL(url) && !url.SchemeIs(url::kJavaScriptScheme) &&
!url.is_empty() && !url.SchemeIs(url::kContentIDScheme) &&
url != content::kAboutSrcDocURL;
}

Powered by Google App Engine
This is Rietveld 408576698