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

Unified Diff: content/browser/frame_host/navigation_request.cc

Issue 1222203004: PlzNavigate: Do not send synchronous navigations from the renderer to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment refactoring Created 5 years, 5 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
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index b5e8977c8a56d6cef1e702c5b7e7795ffe471f48..1c13a714ac52a578e1413f40ad0f3bdc7290da76 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -51,14 +51,6 @@ int LoadFlagFromNavigationType(FrameMsg_Navigate_Type::Value navigation_type) {
} // namespace
// static
-bool NavigationRequest::ShouldMakeNetworkRequest(const GURL& url) {
- // Data and Javascript urls should not make network requests.
- // TODO(clamy): same document navigations should not make network requests.
- return !url.SchemeIs(url::kDataScheme) && url != GURL(url::kAboutBlankURL) &&
- !url.SchemeIs(url::kJavaScriptScheme);
-}
-
-// static
scoped_ptr<NavigationRequest> NavigationRequest::CreateBrowserInitiated(
FrameTreeNode* frame_tree_node,
const FrameNavigationEntry& frame_entry,
@@ -182,7 +174,7 @@ bool NavigationRequest::BeginNavigation() {
DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE);
state_ = STARTED;
- if (ShouldMakeNetworkRequest(common_params_.url)) {
+ if (ShouldMakeNetworkRequestForURL(common_params_.url)) {
loader_ = NavigationURLLoader::Create(
frame_tree_node_->navigator()->GetController()->GetBrowserContext(),
frame_tree_node_->frame_tree_node_id(), info_.Pass(), this);
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698