| 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 59c4d21f6fd95dfd86d893b91691707334b28246..f7a6219cee049156a2b5a50432481032bc9c3173 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -42,10 +42,12 @@ NavigationHandleImpl::NavigationHandleImpl(
|
| FrameTreeNode* frame_tree_node,
|
| const base::TimeTicks& navigation_start)
|
| : url_(url),
|
| + original_url_(url),
|
| is_post_(false),
|
| has_user_gesture_(false),
|
| transition_(ui::PAGE_TRANSITION_LINK),
|
| is_external_protocol_(false),
|
| + is_prefetch_(false),
|
| net_error_code_(net::OK),
|
| render_frame_host_(nullptr),
|
| is_same_page_(false),
|
| @@ -78,6 +80,10 @@ const GURL& NavigationHandleImpl::GetURL() {
|
| return url_;
|
| }
|
|
|
| +const GURL& NavigationHandleImpl::GetOriginalURL() {
|
| + return original_url_;
|
| +}
|
| +
|
| bool NavigationHandleImpl::IsInMainFrame() {
|
| return frame_tree_node_->IsMainFrame();
|
| }
|
| @@ -116,6 +122,12 @@ bool NavigationHandleImpl::IsExternalProtocol() {
|
| return is_external_protocol_;
|
| }
|
|
|
| +bool NavigationHandleImpl::IsPrefetch() {
|
| + CHECK_NE(INITIAL, state_)
|
| + << "This accessor should not be called before the request is started.";
|
| + return is_prefetch_;
|
| +}
|
| +
|
| net::Error NavigationHandleImpl::GetNetErrorCode() {
|
| return net_error_code_;
|
| }
|
| @@ -185,7 +197,7 @@ NavigationHandleImpl::CallWillStartRequestForTesting(
|
| bool is_external_protocol) {
|
| NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER;
|
| WillStartRequest(is_post, sanitized_referrer, has_user_gesture, transition,
|
| - is_external_protocol,
|
| + is_external_protocol, false,
|
| base::Bind(&UpdateThrottleCheckResult, &result));
|
|
|
| // Reset the callback to ensure it will not be called later.
|
| @@ -233,6 +245,7 @@ void NavigationHandleImpl::WillStartRequest(
|
| bool has_user_gesture,
|
| ui::PageTransition transition,
|
| bool is_external_protocol,
|
| + bool is_prefetch,
|
| const ThrottleChecksFinishedCallback& callback) {
|
| // Update the navigation parameters.
|
| is_post_ = is_post;
|
| @@ -240,6 +253,7 @@ void NavigationHandleImpl::WillStartRequest(
|
| has_user_gesture_ = has_user_gesture;
|
| transition_ = transition;
|
| is_external_protocol_ = is_external_protocol;
|
| + is_prefetch_ = is_prefetch;
|
|
|
| state_ = WILL_SEND_REQUEST;
|
| complete_callback_ = callback;
|
|
|