| 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 fd595cf16216f28e9e72351f1e0307b5b2120af3..16eb1f16acffa9751a76c28b67d1aa09bd1c9639 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -277,6 +277,11 @@ bool NavigationHandleImpl::IsErrorPage() {
|
| return state_ == DID_COMMIT_ERROR_PAGE;
|
| }
|
|
|
| +const GURL& NavigationHandleImpl::GetPreviousURL() {
|
| + DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE);
|
| + return previous_url_;
|
| +}
|
| +
|
| void NavigationHandleImpl::Resume() {
|
| if (state_ != DEFERRING_START && state_ != DEFERRING_REDIRECT &&
|
| state_ != DEFERRING_RESPONSE) {
|
| @@ -405,7 +410,7 @@ void NavigationHandleImpl::CallDidCommitNavigationForTesting(const GURL& url) {
|
| params.page_state = PageState::CreateFromURL(url);
|
| params.contents_mime_type = std::string("text/html");
|
|
|
| - DidCommitNavigation(params, false, render_frame_host_);
|
| + DidCommitNavigation(params, false, GURL(), render_frame_host_);
|
| }
|
|
|
| bool NavigationHandleImpl::WasStartedFromContextMenu() const {
|
| @@ -571,6 +576,7 @@ void NavigationHandleImpl::ReadyToCommitNavigation(
|
| void NavigationHandleImpl::DidCommitNavigation(
|
| const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
|
| bool same_page,
|
| + const GURL& previous_url,
|
| 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());
|
| @@ -580,6 +586,7 @@ void NavigationHandleImpl::DidCommitNavigation(
|
| has_user_gesture_ = (params.gesture == NavigationGestureUser);
|
| transition_ = params.transition;
|
| render_frame_host_ = render_frame_host;
|
| + previous_url_ = previous_url;
|
|
|
| // If an error page reloads, net_error_code might be 200 but we still want to
|
| // count it as an error page.
|
|
|