Commit 183f54d2 authored by Jay Civelli's avatar Jay Civelli Committed by Commit Bot

Remove priority from ResourceLoadInfo

The predictor code has been simplified and does not need to know about
resource requests priority anymore. As that code was supposed to be the
only consumer of that field, removing it from resource_load_info.mojom.

Bug: 829935
Tbr: tsepez@chromium.org
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I36e5da88fb4e55af2ad3e94c27be59dd30e1b9c3
Reviewed-on: https://chromium-review.googlesource.com/999829Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarConley Owens <cco3@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550081}
parent 3620c48f
......@@ -63,7 +63,6 @@ void PopulateResourceResponse(
request->GetCharset(&response->head.charset);
response->head.content_length = request->GetExpectedContentSize();
request->GetMimeType(&response->head.mime_type);
response->head.priority = request->priority();
net::HttpResponseInfo response_info = request->response_info();
response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy;
response->head.was_alpn_negotiated = response_info.was_alpn_negotiated;
......
......@@ -721,23 +721,6 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ResourceLoadComplete) {
/*was_cached=*/false, /*first_network_request=*/false, before, after));
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteWithScriptSubresource) {
ResourceLoadObserver observer(shell());
ASSERT_TRUE(embedded_test_server()->Start());
GURL page_url(embedded_test_server()->GetURL("/web_ui_mojo.html"));
NavigateToURL(shell(), page_url);
ASSERT_EQ(2U, observer.resource_load_infos().size());
EXPECT_EQ(page_url, observer.resource_load_infos()[0]->url);
// TODO(crbug.com/826082): This should be net::RequestPriority::HIGHEST.
EXPECT_EQ(net::RequestPriority::DEFAULT_PRIORITY,
observer.resource_load_infos()[0]->priority);
EXPECT_EQ(embedded_test_server()->GetURL("/web_ui_mojo.js"),
observer.resource_load_infos()[1]->url);
EXPECT_EQ(net::RequestPriority::MEDIUM,
observer.resource_load_infos()[1]->priority);
}
// Same as WebContentsImplBrowserTest.ResourceLoadComplete but with resources
// retrieved from the network cache.
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
......
......@@ -7,7 +7,6 @@ module content.mojom;
import "content/public/common/resource_type.mojom";
import "mojo/public/mojom/base/time.mojom";
import "net/interfaces/ip_address.mojom";
import "services/network/public/mojom/url_loader.mojom";
import "url/mojom/url.mojom";
// Information pertaining to resource loading.
......@@ -44,9 +43,6 @@ struct ResourceLoadInfo {
// True if the request accessed the network in the process of retrieving data.
bool network_accessed;
// The priority level for this request.
network.mojom.RequestPriority priority;
// The network error code, net::OK if no error happened.
int32 net_error;
......
......@@ -177,7 +177,6 @@ void ResourceDispatcher::OnReceivedResponse(
request_info->mime_type = response_head.mime_type;
request_info->network_accessed = response_head.network_accessed;
request_info->priority = response_head.priority;
if (!IsResourceTypeFrame(request_info->resource_type)) {
NotifySubresourceStarted(RenderThreadImpl::DeprecatedGetMainTaskRunner(),
request_info->render_frame_id,
......@@ -287,7 +286,6 @@ void ResourceDispatcher::OnRequestComplete(
resource_load_info->ip = request_info->parsed_ip;
resource_load_info->mime_type = request_info->mime_type;
resource_load_info->network_accessed = request_info->network_accessed;
resource_load_info->priority = request_info->priority;
resource_load_info->was_cached = status.exists_in_cache;
resource_load_info->net_error = status.error_code;
resource_load_info->request_start = request_info->request_start;
......@@ -390,7 +388,6 @@ void ResourceDispatcher::DidChangePriority(int request_id,
return;
}
request_info->priority = new_priority;
request_info->url_loader->SetPriority(new_priority, intra_priority_value);
}
......
......@@ -204,7 +204,6 @@ class CONTENT_EXPORT ResourceDispatcher {
net::IPAddress parsed_ip;
bool network_accessed = false;
std::string mime_type;
net::RequestPriority priority = net::RequestPriority::DEFAULT_PRIORITY;
// For mojo loading.
std::unique_ptr<ThrottlingURLLoader> url_loader;
......
......@@ -365,7 +365,6 @@ IPC_STRUCT_TRAITS_BEGIN(network::ResourceResponseInfo)
IPC_STRUCT_TRAITS_MEMBER(encoded_body_length)
IPC_STRUCT_TRAITS_MEMBER(appcache_id)
IPC_STRUCT_TRAITS_MEMBER(appcache_manifest_url)
IPC_STRUCT_TRAITS_MEMBER(priority)
IPC_STRUCT_TRAITS_MEMBER(load_timing)
IPC_STRUCT_TRAITS_MEMBER(raw_request_response_info)
IPC_STRUCT_TRAITS_MEMBER(download_file_path)
......
......@@ -17,7 +17,6 @@ ResourceResponseInfo::ResourceResponseInfo()
encoded_body_length(-1),
network_accessed(false),
appcache_id(0),
priority(net::RequestPriority::DEFAULT_PRIORITY),
was_fetched_via_spdy(false),
was_alpn_negotiated(false),
was_alternate_protocol_available(false),
......
......@@ -15,7 +15,6 @@
#include "base/time/time.h"
#include "net/base/host_port_pair.h"
#include "net/base/load_timing_info.h"
#include "net/base/request_priority.h"
#include "net/cert/ct_policy_status.h"
#include "net/cert/signed_certificate_timestamp_and_status.h"
#include "net/http/http_response_headers.h"
......@@ -81,9 +80,6 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceResponseInfo {
// Note: this value is only populated for main resource requests.
GURL appcache_manifest_url;
// The priority level for this request.
net::RequestPriority priority;
// Detailed timing information used by the WebTiming, HAR and Developer
// Tools. Includes socket ID and socket reuse information.
net::LoadTimingInfo load_timing;
......
......@@ -49,7 +49,6 @@ void PopulateResourceResponse(net::URLRequest* request,
request->GetCharset(&response->head.charset);
response->head.content_length = request->GetExpectedContentSize();
request->GetMimeType(&response->head.mime_type);
response->head.priority = request->priority();
net::HttpResponseInfo response_info = request->response_info();
response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy;
response->head.was_alpn_negotiated = response_info.was_alpn_negotiated;
......
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