| Index: content/common/navigation_params.cc
|
| diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc
|
| index 8b70c8ffb9718acfc22352f71d3643591cad57c7..b9cd7d36e5166b9e1e0faada4dcd9ed6850667c9 100644
|
| --- a/content/common/navigation_params.cc
|
| +++ b/content/common/navigation_params.cc
|
| @@ -4,10 +4,25 @@
|
|
|
| #include "content/common/navigation_params.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "base/memory/ref_counted_memory.h"
|
| +#include "content/public/common/content_switches.h"
|
|
|
| namespace content {
|
|
|
| +// PlzNavigate
|
| +bool ShouldMakeNetworkRequestForURL(const GURL& url) {
|
| + CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableBrowserSideNavigation));
|
| +
|
| + // Data URLs, Javascript URLs and about:blank should not send a request to the
|
| + // network stack.
|
| + // TODO(clamy): same document navigations should not send requests to the
|
| + // network stack. Neither should pushState/popState.
|
| + return !url.SchemeIs(url::kDataScheme) && url != GURL(url::kAboutBlankURL) &&
|
| + !url.SchemeIs(url::kJavaScriptScheme);
|
| +}
|
| +
|
| CommonNavigationParams::CommonNavigationParams()
|
| : transition(ui::PAGE_TRANSITION_LINK),
|
| navigation_type(FrameMsg_Navigate_Type::NORMAL),
|
|
|