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

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

Issue 2682193002: Convert NavigationController unit and browser tests to use the new navigation callbacks. (Closed)
Patch Set: merge Created 3 years, 10 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_handle_impl.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_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 02a2c40e487a966c400866304c398302cfa277be..74e0b202c6f005ffc79bb32c909b01bb847c83f2 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -108,6 +108,7 @@ NavigationHandleImpl::NavigationHandleImpl(
is_stream_(false),
started_from_context_menu_(started_from_context_menu),
reload_type_(ReloadType::NONE),
+ navigation_type_(NAVIGATION_TYPE_UNKNOWN),
weak_factory_(this) {
DCHECK(!navigation_start.is_null());
if (redirect_chain_.empty())
@@ -431,7 +432,8 @@ void NavigationHandleImpl::CallDidCommitNavigationForTesting(const GURL& url) {
params.page_state = PageState::CreateFromURL(url);
params.contents_mime_type = std::string("text/html");
- DidCommitNavigation(params, false, GURL(), render_frame_host_);
+ DidCommitNavigation(params, false, GURL(), NAVIGATION_TYPE_NEW_PAGE,
+ render_frame_host_);
}
bool NavigationHandleImpl::WasStartedFromContextMenu() const {
@@ -611,6 +613,7 @@ void NavigationHandleImpl::DidCommitNavigation(
const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
bool did_replace_entry,
const GURL& previous_url,
+ NavigationType navigation_type,
RenderFrameHostImpl* render_frame_host) {
DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host);
DCHECK_EQ(frame_tree_node_, render_frame_host->frame_tree_node());
@@ -625,6 +628,7 @@ void NavigationHandleImpl::DidCommitNavigation(
previous_url_ = previous_url;
base_url_ = params.base_url;
socket_address_ = params.socket_address;
+ navigation_type_ = navigation_type;
// If an error page reloads, net_error_code might be 200 but we still want to
// count it as an error page.
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698