Chromium Code Reviews| Index: content/common/navigation_params.cc |
| diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc |
| index 8b70c8ffb9718acfc22352f71d3643591cad57c7..364df181f1d73b88f7c1d9edfb4dcf34b56f5ab1 100644 |
| --- a/content/common/navigation_params.cc |
| +++ b/content/common/navigation_params.cc |
| @@ -4,10 +4,21 @@ |
| #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 { |
| +bool ShouldMakeNetworkRequestForURL(const GURL& url) { |
| + // Data and Javascript urls should not make network requests. |
|
nasko
2015/07/06 11:06:16
If the comment is aiming to list the cases for no
Fabrice (no longer in Chrome)
2015/07/06 12:45:09
I modified the comment to clarify.
|
| + // TODO(clamy): same document navigations should not make network requests. |
| + CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
|
clamy
2015/07/03 15:02:23
nit: put the check above the comments, as they rel
Fabrice (no longer in Chrome)
2015/07/06 12:45:09
Done.
|
| + switches::kEnableBrowserSideNavigation)); |
| + 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), |