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

Unified Diff: content/common/navigation_params.cc

Issue 2644133002: Do not sanitize about:blank/#foo & about:blank?foo (Closed)
Patch Set: Add missing include 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..0bd0621bad0b7eccf341564da80383d2ff32a049 100644
--- a/content/common/navigation_params.cc
+++ b/content/common/navigation_params.cc
@@ -12,6 +12,7 @@
#include "content/public/common/url_constants.h"
#include "url/gurl.h"
#include "url/url_constants.h"
+#include "url/url_util.h"
namespace content {
@@ -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 !url::IsAboutBlank(url) && !url.SchemeIs(url::kJavaScriptScheme) &&
!url.is_empty() && !url.SchemeIs(url::kContentIDScheme) &&
url != content::kAboutSrcDocURL;
}

Powered by Google App Engine
This is Rietveld 408576698