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

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

Issue 1092973002: Revert of PlzNavigate: move ownership of the NavigationRequest to the FrameTreeNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 4a0db77650e2671ddbad1a3bd49d12d14e9fa7cd..daf4a71255d6b8a9c6f30493364f25644dd18620 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -9,7 +9,6 @@
#include "base/command_line.h"
#include "base/stl_util.h"
#include "content/browser/frame_host/frame_tree.h"
-#include "content/browser/frame_host/navigation_request.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
@@ -72,6 +71,10 @@
frame_tree_->FrameRemoved(this);
g_frame_tree_node_id_map.Get().erase(frame_tree_node_id_);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBrowserSideNavigation)) {
+ navigator_->CancelNavigation(this);
+ }
}
bool FrameTreeNode::IsMainFrame() const {
@@ -171,27 +174,4 @@
return did_change_flags;
}
-void FrameTreeNode::SetNavigationRequest(
- scoped_ptr<NavigationRequest> navigation_request) {
- CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBrowserSideNavigation));
- ResetNavigationRequest(false);
- // TODO(clamy): perform the StartLoading logic here.
- navigation_request_ = navigation_request.Pass();
-}
-
-void FrameTreeNode::ResetNavigationRequest(bool is_commit) {
- CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBrowserSideNavigation));
- // Upon commit the current NavigationRequest will be reset. There should be no
- // cleanup performed since the navigation is still ongoing. If the reset
- // corresponds to a cancelation, the RenderFrameHostManager should clean up
- // any speculative RenderFrameHost it created for the navigation.
- if (navigation_request_ && !is_commit) {
- // TODO(clamy): perform the StopLoading logic.
- render_manager_.CleanUpNavigation();
- }
- navigation_request_.reset();
-}
-
} // namespace content
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698