Commit e8a36809 authored by Dmitry Gozman's avatar Dmitry Gozman Committed by Commit Bot

Remove ResourceRequest::IsSameDocumentNavigation

This is always set to false nowdays.

Bug: 789577
Change-Id: Ic52082fe3c0f4a82e9e602a028a2f0c042f559fe
Reviewed-on: https://chromium-review.googlesource.com/1069799
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563136}
parent ef4595d7
......@@ -421,8 +421,7 @@ WebURLRequest CreateURLRequestForNavigation(
const CommonNavigationParams& common_params,
const RequestNavigationParams& request_params,
std::unique_ptr<NavigationResponseOverrideParameters> response_override,
bool is_view_source_mode_enabled,
bool is_same_document_navigation) {
bool is_view_source_mode_enabled) {
// Use the original navigation url to construct the WebURLRequest. The
// WebURLloaderImpl will replay the redirects afterwards and will eventually
// commit the final url.
......@@ -455,7 +454,6 @@ WebURLRequest CreateURLRequestForNavigation(
request.SetHTTPReferrer(web_referrer, common_params.referrer.policy);
}
request.SetIsSameDocumentNavigation(is_same_document_navigation);
request.SetPreviewsState(
static_cast<WebURLRequest::PreviewsState>(common_params.previews_state));
......@@ -3037,8 +3035,7 @@ void RenderFrameImpl::CommitFailedNavigation(
WebURLError::IsWebSecurityViolation::kFalse, common_params.url);
WebURLRequest failed_request = CreateURLRequestForNavigation(
common_params, request_params,
/*response_override=*/nullptr, frame_->IsViewSourceModeEnabled(),
false); // is_same_document_navigation
/*response_override=*/nullptr, frame_->IsViewSourceModeEnabled());
if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) {
// The browser expects this frame to be loading an error page. Inform it
......@@ -6339,7 +6336,7 @@ WebURLRequest RenderFrameImpl::CreateURLRequestForCommit(
WebURLRequest request = CreateURLRequestForNavigation(
common_params, request_params, std::move(response_override),
frame_->IsViewSourceModeEnabled(), false /* is_same_document */);
frame_->IsViewSourceModeEnabled());
request.SetFrameType(IsTopLevelNavigation(frame_)
? network::mojom::RequestContextFrameType::kTopLevel
: network::mojom::RequestContextFrameType::kNested);
......
......@@ -340,12 +340,6 @@ class WebURLRequest {
BLINK_PLATFORM_EXPORT void SetNavigationStartTime(base::TimeTicks);
// PlzNavigate: specify that the request was intended to be loaded as a same
// document navigation. No network requests should be made and the request
// should be dropped if a different document was loaded in the frame
// in-between.
BLINK_PLATFORM_EXPORT void SetIsSameDocumentNavigation(bool);
// If this request was created from an anchor with a download attribute, this
// is the value provided there.
BLINK_PLATFORM_EXPORT base::Optional<WebString> GetSuggestedFilename() const;
......
......@@ -718,7 +718,6 @@ bool FrameLoader::PrepareRequestForThisFrame(FrameLoadRequest& request) {
// embedder figure out what to do with it. Navigations to filesystem URLs are
// always blocked here.
if (frame_->IsMainFrame() &&
!request.GetResourceRequest().IsSameDocumentNavigation() &&
!frame_->Client()->AllowContentInitiatedDataUrlNavigations(
request.OriginDocument()->Url()) &&
(url.ProtocolIs("filesystem") ||
......@@ -943,14 +942,6 @@ void FrameLoader::LoadInternal(const FrameLoadRequest& passed_request,
return;
}
// PlzNavigate
// If the loader classifies this navigation as a different document navigation
// while the browser intended the navigation to be same-document, it means
// that a different navigation must have committed while the IPC was sent.
// This navigation is no more same-document. The navigation is simply dropped.
if (request.GetResourceRequest().IsSameDocumentNavigation())
return;
StartLoad(request, new_load_type, policy, history_item, check_with_client);
}
......@@ -1621,7 +1612,6 @@ void FrameLoader::StartLoad(FrameLoadRequest& frame_load_request,
provisional_document_loader_->SetItemForHistoryNavigation(history_item);
}
DCHECK(!frame_load_request.GetResourceRequest().IsSameDocumentNavigation());
frame_->GetFrameScheduler()->DidStartProvisionalLoad(frame_->IsMainFrame());
// TODO(ananta):
......
......@@ -397,10 +397,6 @@ void WebURLRequest::SetNavigationStartTime(
resource_request_->SetNavigationStartTime(navigation_start_seconds);
}
void WebURLRequest::SetIsSameDocumentNavigation(bool is_same_document) {
resource_request_->SetIsSameDocumentNavigation(is_same_document);
}
WebURLRequest::InputToLoadPerfMetricReportPolicy
WebURLRequest::InputPerfMetricReportPolicy() const {
return static_cast<WebURLRequest::InputToLoadPerfMetricReportPolicy>(
......
......@@ -79,7 +79,6 @@ ResourceRequest::ResourceRequest(const KURL& url)
is_external_request_(false),
cors_preflight_policy_(
network::mojom::CORSPreflightPolicy::kConsiderPreflight),
is_same_document_navigation_(false),
input_perf_metric_report_policy_(
InputToLoadPerfMetricReportPolicy::kNoReport),
redirect_status_(RedirectStatus::kNoRedirect) {}
......
......@@ -366,11 +366,6 @@ class PLATFORM_EXPORT ResourceRequest final {
void SetNavigationStartTime(TimeTicks);
TimeTicks NavigationStartTime() const { return navigation_start_; }
void SetIsSameDocumentNavigation(bool is_same_document) {
is_same_document_navigation_ = is_same_document;
}
bool IsSameDocumentNavigation() const { return is_same_document_navigation_; }
void SetIsAdResource() { is_ad_resource_ = true; }
bool IsAdResource() const { return is_ad_resource_; }
......@@ -436,7 +431,6 @@ class PLATFORM_EXPORT ResourceRequest final {
double ui_start_time_;
bool is_external_request_;
network::mojom::CORSPreflightPolicy cors_preflight_policy_;
bool is_same_document_navigation_;
InputToLoadPerfMetricReportPolicy input_perf_metric_report_policy_;
RedirectStatus redirect_status_;
base::Optional<String> suggested_filename_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment