Commit 35729677 authored by Johannes Henkel's avatar Johannes Henkel Committed by Commit Bot

DevtoolsProtocol dependency maintenance.

Resolve domain dependency cycle Page <-> Network,
by moving ResourceType to Network.

Also add some "depends on" declarations that were missing.
This breaks client code (easy to fix) but won't change
the wire protocol.

Change-Id: I8b0321d45923b8897f39cb7420e63a7ddffd5357
Reviewed-on: https://chromium-review.googlesource.com/1212091Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589569}
parent 5b442915
...@@ -663,48 +663,49 @@ String NetErrorToString(int net_error) { ...@@ -663,48 +663,49 @@ String NetErrorToString(int net_error) {
bool AddInterceptedResourceType( bool AddInterceptedResourceType(
const std::string& resource_type, const std::string& resource_type,
base::flat_set<ResourceType>* intercepted_resource_types) { base::flat_set<ResourceType>* intercepted_resource_types) {
if (resource_type == protocol::Page::ResourceTypeEnum::Document) { if (resource_type == protocol::Network::ResourceTypeEnum::Document) {
intercepted_resource_types->insert(RESOURCE_TYPE_MAIN_FRAME); intercepted_resource_types->insert(RESOURCE_TYPE_MAIN_FRAME);
intercepted_resource_types->insert(RESOURCE_TYPE_SUB_FRAME); intercepted_resource_types->insert(RESOURCE_TYPE_SUB_FRAME);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Stylesheet) { if (resource_type == protocol::Network::ResourceTypeEnum::Stylesheet) {
intercepted_resource_types->insert(RESOURCE_TYPE_STYLESHEET); intercepted_resource_types->insert(RESOURCE_TYPE_STYLESHEET);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Image) { if (resource_type == protocol::Network::ResourceTypeEnum::Image) {
intercepted_resource_types->insert(RESOURCE_TYPE_IMAGE); intercepted_resource_types->insert(RESOURCE_TYPE_IMAGE);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Media) { if (resource_type == protocol::Network::ResourceTypeEnum::Media) {
intercepted_resource_types->insert(RESOURCE_TYPE_MEDIA); intercepted_resource_types->insert(RESOURCE_TYPE_MEDIA);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Font) { if (resource_type == protocol::Network::ResourceTypeEnum::Font) {
intercepted_resource_types->insert(RESOURCE_TYPE_FONT_RESOURCE); intercepted_resource_types->insert(RESOURCE_TYPE_FONT_RESOURCE);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Script) { if (resource_type == protocol::Network::ResourceTypeEnum::Script) {
intercepted_resource_types->insert(RESOURCE_TYPE_SCRIPT); intercepted_resource_types->insert(RESOURCE_TYPE_SCRIPT);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::XHR) { if (resource_type == protocol::Network::ResourceTypeEnum::XHR) {
intercepted_resource_types->insert(RESOURCE_TYPE_XHR); intercepted_resource_types->insert(RESOURCE_TYPE_XHR);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Fetch) { if (resource_type == protocol::Network::ResourceTypeEnum::Fetch) {
intercepted_resource_types->insert(RESOURCE_TYPE_PREFETCH); intercepted_resource_types->insert(RESOURCE_TYPE_PREFETCH);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::CSPViolationReport) { if (resource_type ==
protocol::Network::ResourceTypeEnum::CSPViolationReport) {
intercepted_resource_types->insert(RESOURCE_TYPE_CSP_REPORT); intercepted_resource_types->insert(RESOURCE_TYPE_CSP_REPORT);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Ping) { if (resource_type == protocol::Network::ResourceTypeEnum::Ping) {
intercepted_resource_types->insert(RESOURCE_TYPE_PING); intercepted_resource_types->insert(RESOURCE_TYPE_PING);
return true; return true;
} }
if (resource_type == protocol::Page::ResourceTypeEnum::Other) { if (resource_type == protocol::Network::ResourceTypeEnum::Other) {
intercepted_resource_types->insert(RESOURCE_TYPE_SUB_RESOURCE); intercepted_resource_types->insert(RESOURCE_TYPE_SUB_RESOURCE);
intercepted_resource_types->insert(RESOURCE_TYPE_OBJECT); intercepted_resource_types->insert(RESOURCE_TYPE_OBJECT);
intercepted_resource_types->insert(RESOURCE_TYPE_WORKER); intercepted_resource_types->insert(RESOURCE_TYPE_WORKER);
...@@ -1602,7 +1603,7 @@ void NetworkHandler::NavigationRequestWillBeSent( ...@@ -1602,7 +1603,7 @@ void NetworkHandler::NavigationRequestWillBeSent(
frontend_->RequestWillBeSent( frontend_->RequestWillBeSent(
id, id, url_without_fragment, std::move(request), current_ticks, id, id, url_without_fragment, std::move(request), current_ticks,
current_wall_time, std::move(initiator), std::move(redirect_response), current_wall_time, std::move(initiator), std::move(redirect_response),
std::string(Page::ResourceTypeEnum::Document), std::move(frame_token), std::string(Network::ResourceTypeEnum::Document), std::move(frame_token),
common_params.has_user_gesture); common_params.has_user_gesture);
} }
...@@ -1639,7 +1640,7 @@ void NetworkHandler::RequestSent(const std::string& request_id, ...@@ -1639,7 +1640,7 @@ void NetworkHandler::RequestSent(const std::string& request_id,
static_cast<double>(base::Time::kMicrosecondsPerSecond), static_cast<double>(base::Time::kMicrosecondsPerSecond),
base::Time::Now().ToDoubleT(), std::move(initiator), base::Time::Now().ToDoubleT(), std::move(initiator),
std::unique_ptr<Network::Response>(), std::unique_ptr<Network::Response>(),
std::string(Page::ResourceTypeEnum::Other), std::string(Network::ResourceTypeEnum::Other),
Maybe<std::string>() /* frame_id */, request.has_user_gesture); Maybe<std::string>() /* frame_id */, request.has_user_gesture);
} }
...@@ -2040,43 +2041,43 @@ namespace { ...@@ -2040,43 +2041,43 @@ namespace {
const char* ResourceTypeToString(ResourceType resource_type) { const char* ResourceTypeToString(ResourceType resource_type) {
switch (resource_type) { switch (resource_type) {
case RESOURCE_TYPE_MAIN_FRAME: case RESOURCE_TYPE_MAIN_FRAME:
return protocol::Page::ResourceTypeEnum::Document; return protocol::Network::ResourceTypeEnum::Document;
case RESOURCE_TYPE_SUB_FRAME: case RESOURCE_TYPE_SUB_FRAME:
return protocol::Page::ResourceTypeEnum::Document; return protocol::Network::ResourceTypeEnum::Document;
case RESOURCE_TYPE_STYLESHEET: case RESOURCE_TYPE_STYLESHEET:
return protocol::Page::ResourceTypeEnum::Stylesheet; return protocol::Network::ResourceTypeEnum::Stylesheet;
case RESOURCE_TYPE_SCRIPT: case RESOURCE_TYPE_SCRIPT:
return protocol::Page::ResourceTypeEnum::Script; return protocol::Network::ResourceTypeEnum::Script;
case RESOURCE_TYPE_IMAGE: case RESOURCE_TYPE_IMAGE:
return protocol::Page::ResourceTypeEnum::Image; return protocol::Network::ResourceTypeEnum::Image;
case RESOURCE_TYPE_FONT_RESOURCE: case RESOURCE_TYPE_FONT_RESOURCE:
return protocol::Page::ResourceTypeEnum::Font; return protocol::Network::ResourceTypeEnum::Font;
case RESOURCE_TYPE_SUB_RESOURCE: case RESOURCE_TYPE_SUB_RESOURCE:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
case RESOURCE_TYPE_OBJECT: case RESOURCE_TYPE_OBJECT:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
case RESOURCE_TYPE_MEDIA: case RESOURCE_TYPE_MEDIA:
return protocol::Page::ResourceTypeEnum::Media; return protocol::Network::ResourceTypeEnum::Media;
case RESOURCE_TYPE_WORKER: case RESOURCE_TYPE_WORKER:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
case RESOURCE_TYPE_SHARED_WORKER: case RESOURCE_TYPE_SHARED_WORKER:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
case RESOURCE_TYPE_PREFETCH: case RESOURCE_TYPE_PREFETCH:
return protocol::Page::ResourceTypeEnum::Fetch; return protocol::Network::ResourceTypeEnum::Fetch;
case RESOURCE_TYPE_FAVICON: case RESOURCE_TYPE_FAVICON:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
case RESOURCE_TYPE_XHR: case RESOURCE_TYPE_XHR:
return protocol::Page::ResourceTypeEnum::XHR; return protocol::Network::ResourceTypeEnum::XHR;
case RESOURCE_TYPE_PING: case RESOURCE_TYPE_PING:
return protocol::Page::ResourceTypeEnum::Ping; return protocol::Network::ResourceTypeEnum::Ping;
case RESOURCE_TYPE_SERVICE_WORKER: case RESOURCE_TYPE_SERVICE_WORKER:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
case RESOURCE_TYPE_CSP_REPORT: case RESOURCE_TYPE_CSP_REPORT:
return protocol::Page::ResourceTypeEnum::CSPViolationReport; return protocol::Network::ResourceTypeEnum::CSPViolationReport;
case RESOURCE_TYPE_PLUGIN_RESOURCE: case RESOURCE_TYPE_PLUGIN_RESOURCE:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
default: default:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
} }
} }
......
...@@ -209,7 +209,7 @@ void RenderFrameDevToolsAgentHost::OnNavigationResponseReceived( ...@@ -209,7 +209,7 @@ void RenderFrameDevToolsAgentHost::OnNavigationResponseReceived(
std::string frame_id = ftn->devtools_frame_token().ToString(); std::string frame_id = ftn->devtools_frame_token().ToString();
GURL url = nav_request.common_params().url; GURL url = nav_request.common_params().url;
DispatchToAgents(ftn, &protocol::NetworkHandler::ResponseReceived, id, id, DispatchToAgents(ftn, &protocol::NetworkHandler::ResponseReceived, id, id,
url, protocol::Page::ResourceTypeEnum::Document, url, protocol::Network::ResourceTypeEnum::Document,
response.head, frame_id); response.head, frame_id);
} }
...@@ -220,7 +220,7 @@ void RenderFrameDevToolsAgentHost::OnNavigationRequestFailed( ...@@ -220,7 +220,7 @@ void RenderFrameDevToolsAgentHost::OnNavigationRequestFailed(
FrameTreeNode* ftn = nav_request.frame_tree_node(); FrameTreeNode* ftn = nav_request.frame_tree_node();
std::string id = nav_request.devtools_navigation_token().ToString(); std::string id = nav_request.devtools_navigation_token().ToString();
DispatchToAgents(ftn, &protocol::NetworkHandler::LoadingComplete, id, DispatchToAgents(ftn, &protocol::NetworkHandler::LoadingComplete, id,
protocol::Page::ResourceTypeEnum::Document, status); protocol::Network::ResourceTypeEnum::Document, status);
} }
// static // static
...@@ -261,7 +261,7 @@ void RenderFrameDevToolsAgentHost::OnSignedExchangeCertificateResponseReceived( ...@@ -261,7 +261,7 @@ void RenderFrameDevToolsAgentHost::OnSignedExchangeCertificateResponseReceived(
const network::ResourceResponseHead& head) { const network::ResourceResponseHead& head) {
DispatchToAgents(frame_tree_node, &protocol::NetworkHandler::ResponseReceived, DispatchToAgents(frame_tree_node, &protocol::NetworkHandler::ResponseReceived,
request_id.ToString(), loader_id.ToString(), url, request_id.ToString(), loader_id.ToString(), url,
protocol::Page::ResourceTypeEnum::Other, head, protocol::Network::ResourceTypeEnum::Other, head,
protocol::Maybe<std::string>()); protocol::Maybe<std::string>());
} }
...@@ -272,7 +272,7 @@ void RenderFrameDevToolsAgentHost::OnSignedExchangeCertificateRequestCompleted( ...@@ -272,7 +272,7 @@ void RenderFrameDevToolsAgentHost::OnSignedExchangeCertificateRequestCompleted(
const network::URLLoaderCompletionStatus& status) { const network::URLLoaderCompletionStatus& status) {
DispatchToAgents(frame_tree_node, &protocol::NetworkHandler::LoadingComplete, DispatchToAgents(frame_tree_node, &protocol::NetworkHandler::LoadingComplete,
request_id.ToString(), request_id.ToString(),
protocol::Page::ResourceTypeEnum::Other, status); protocol::Network::ResourceTypeEnum::Other, status);
} }
// static // static
......
...@@ -205,7 +205,7 @@ void ServiceWorkerDevToolsManager::NavigationPreloadResponseReceived( ...@@ -205,7 +205,7 @@ void ServiceWorkerDevToolsManager::NavigationPreloadResponseReceived(
return; return;
for (auto* network : protocol::NetworkHandler::ForAgentHost(it->second.get())) for (auto* network : protocol::NetworkHandler::ForAgentHost(it->second.get()))
network->ResponseReceived(request_id, std::string(), url, network->ResponseReceived(request_id, std::string(), url,
protocol::Page::ResourceTypeEnum::Other, head, protocol::Network::ResourceTypeEnum::Other, head,
protocol::Maybe<std::string>()); protocol::Maybe<std::string>());
} }
...@@ -219,8 +219,8 @@ void ServiceWorkerDevToolsManager::NavigationPreloadCompleted( ...@@ -219,8 +219,8 @@ void ServiceWorkerDevToolsManager::NavigationPreloadCompleted(
if (it == live_hosts_.end()) if (it == live_hosts_.end())
return; return;
for (auto* network : protocol::NetworkHandler::ForAgentHost(it->second.get())) for (auto* network : protocol::NetworkHandler::ForAgentHost(it->second.get()))
network->LoadingComplete(request_id, network->LoadingComplete(
protocol::Page::ResourceTypeEnum::Other, status); request_id, protocol::Network::ResourceTypeEnum::Other, status);
} }
} // namespace content } // namespace content
...@@ -1909,6 +1909,7 @@ domain DOM ...@@ -1909,6 +1909,7 @@ domain DOM
domain DOMDebugger domain DOMDebugger
depends on DOM depends on DOM
depends on Debugger depends on Debugger
depends on Runtime
# DOM breakpoint type. # DOM breakpoint type.
type DOMBreakpointType extends string type DOMBreakpointType extends string
...@@ -3482,6 +3483,26 @@ domain Network ...@@ -3482,6 +3483,26 @@ domain Network
depends on Runtime depends on Runtime
depends on Security depends on Security
# Resource type as it was perceived by the rendering engine.
type ResourceType extends string
enum
Document
Stylesheet
Image
Media
Font
Script
TextTrack
XHR
Fetch
EventSource
WebSocket
Manifest
SignedExchange
Ping
CSPViolationReport
Other
# Unique loader identifier. # Unique loader identifier.
type LoaderId extends string type LoaderId extends string
...@@ -3765,7 +3786,7 @@ domain Network ...@@ -3765,7 +3786,7 @@ domain Network
# Resource URL. This is the url of the original network request. # Resource URL. This is the url of the original network request.
string url string url
# Type of this resource. # Type of this resource.
Page.ResourceType type ResourceType type
# Cached response data. # Cached response data.
optional Response response optional Response response
# Cached response body size. # Cached response body size.
...@@ -3881,7 +3902,7 @@ domain Network ...@@ -3881,7 +3902,7 @@ domain Network
# backslash. Omitting is equivalent to "*". # backslash. Omitting is equivalent to "*".
optional string urlPattern optional string urlPattern
# If set, only requests for matching resource types will be intercepted. # If set, only requests for matching resource types will be intercepted.
optional Page.ResourceType resourceType optional ResourceType resourceType
# Stage at wich to begin intercepting requests. Default is Request. # Stage at wich to begin intercepting requests. Default is Request.
optional InterceptionStage interceptionStage optional InterceptionStage interceptionStage
...@@ -4252,7 +4273,7 @@ domain Network ...@@ -4252,7 +4273,7 @@ domain Network
# Timestamp. # Timestamp.
MonotonicTime timestamp MonotonicTime timestamp
# Resource type. # Resource type.
Page.ResourceType type ResourceType type
# User friendly error message. # User friendly error message.
string errorText string errorText
# True if loading was canceled. # True if loading was canceled.
...@@ -4285,7 +4306,7 @@ domain Network ...@@ -4285,7 +4306,7 @@ domain Network
# The id of the frame that initiated the request. # The id of the frame that initiated the request.
Page.FrameId frameId Page.FrameId frameId
# How the requested resource will be used. # How the requested resource will be used.
Page.ResourceType resourceType ResourceType resourceType
# Whether this is a navigation request, which can abort the navigation completely. # Whether this is a navigation request, which can abort the navigation completely.
boolean isNavigationRequest boolean isNavigationRequest
# Set if the request is a navigation that will result in a download. # Set if the request is a navigation that will result in a download.
...@@ -4332,7 +4353,7 @@ domain Network ...@@ -4332,7 +4353,7 @@ domain Network
# Redirect response data. # Redirect response data.
optional Response redirectResponse optional Response redirectResponse
# Type of this resource. # Type of this resource.
optional Page.ResourceType type optional ResourceType type
# Frame identifier. # Frame identifier.
optional Page.FrameId frameId optional Page.FrameId frameId
# Whether the request is initiated by a user gesture. Defaults to false. # Whether the request is initiated by a user gesture. Defaults to false.
...@@ -4366,7 +4387,7 @@ domain Network ...@@ -4366,7 +4387,7 @@ domain Network
# Timestamp. # Timestamp.
MonotonicTime timestamp MonotonicTime timestamp
# Resource type. # Resource type.
Page.ResourceType type ResourceType type
# Response data. # Response data.
Response response Response response
# Frame identifier. # Frame identifier.
...@@ -4623,26 +4644,7 @@ domain Page ...@@ -4623,26 +4644,7 @@ domain Page
depends on Debugger depends on Debugger
depends on DOM depends on DOM
depends on Network depends on Network
depends on Runtime
# Resource type as it was perceived by the rendering engine.
type ResourceType extends string
enum
Document
Stylesheet
Image
Media
Font
Script
TextTrack
XHR
Fetch
EventSource
WebSocket
Manifest
SignedExchange
Ping
CSPViolationReport
Other
# Unique frame identifier. # Unique frame identifier.
type FrameId extends string type FrameId extends string
...@@ -4673,7 +4675,7 @@ domain Page ...@@ -4673,7 +4675,7 @@ domain Page
# Resource URL. # Resource URL.
string url string url
# Type of this resource. # Type of this resource.
ResourceType type Network.ResourceType type
# Resource mimeType as determined by the browser. # Resource mimeType as determined by the browser.
string mimeType string mimeType
# last-modified timestamp as reported by server. # last-modified timestamp as reported by server.
......
...@@ -373,35 +373,35 @@ String InspectorPageAgent::ResourceTypeJson( ...@@ -373,35 +373,35 @@ String InspectorPageAgent::ResourceTypeJson(
InspectorPageAgent::ResourceType resource_type) { InspectorPageAgent::ResourceType resource_type) {
switch (resource_type) { switch (resource_type) {
case kDocumentResource: case kDocumentResource:
return protocol::Page::ResourceTypeEnum::Document; return protocol::Network::ResourceTypeEnum::Document;
case kFontResource: case kFontResource:
return protocol::Page::ResourceTypeEnum::Font; return protocol::Network::ResourceTypeEnum::Font;
case kImageResource: case kImageResource:
return protocol::Page::ResourceTypeEnum::Image; return protocol::Network::ResourceTypeEnum::Image;
case kMediaResource: case kMediaResource:
return protocol::Page::ResourceTypeEnum::Media; return protocol::Network::ResourceTypeEnum::Media;
case kScriptResource: case kScriptResource:
return protocol::Page::ResourceTypeEnum::Script; return protocol::Network::ResourceTypeEnum::Script;
case kStylesheetResource: case kStylesheetResource:
return protocol::Page::ResourceTypeEnum::Stylesheet; return protocol::Network::ResourceTypeEnum::Stylesheet;
case kTextTrackResource: case kTextTrackResource:
return protocol::Page::ResourceTypeEnum::TextTrack; return protocol::Network::ResourceTypeEnum::TextTrack;
case kXHRResource: case kXHRResource:
return protocol::Page::ResourceTypeEnum::XHR; return protocol::Network::ResourceTypeEnum::XHR;
case kFetchResource: case kFetchResource:
return protocol::Page::ResourceTypeEnum::Fetch; return protocol::Network::ResourceTypeEnum::Fetch;
case kEventSourceResource: case kEventSourceResource:
return protocol::Page::ResourceTypeEnum::EventSource; return protocol::Network::ResourceTypeEnum::EventSource;
case kWebSocketResource: case kWebSocketResource:
return protocol::Page::ResourceTypeEnum::WebSocket; return protocol::Network::ResourceTypeEnum::WebSocket;
case kManifestResource: case kManifestResource:
return protocol::Page::ResourceTypeEnum::Manifest; return protocol::Network::ResourceTypeEnum::Manifest;
case kSignedExchangeResource: case kSignedExchangeResource:
return protocol::Page::ResourceTypeEnum::SignedExchange; return protocol::Network::ResourceTypeEnum::SignedExchange;
case kOtherResource: case kOtherResource:
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
} }
return protocol::Page::ResourceTypeEnum::Other; return protocol::Network::ResourceTypeEnum::Other;
} }
InspectorPageAgent::ResourceType InspectorPageAgent::ToResourceType( InspectorPageAgent::ResourceType InspectorPageAgent::ToResourceType(
......
...@@ -443,7 +443,7 @@ SDK.NetworkDispatcher = class { ...@@ -443,7 +443,7 @@ SDK.NetworkDispatcher = class {
* @param {!Protocol.Network.TimeSinceEpoch} wallTime * @param {!Protocol.Network.TimeSinceEpoch} wallTime
* @param {!Protocol.Network.Initiator} initiator * @param {!Protocol.Network.Initiator} initiator
* @param {!Protocol.Network.Response=} redirectResponse * @param {!Protocol.Network.Response=} redirectResponse
* @param {!Protocol.Page.ResourceType=} resourceType * @param {!Protocol.Network.ResourceType=} resourceType
* @param {!Protocol.Page.FrameId=} frameId * @param {!Protocol.Page.FrameId=} frameId
*/ */
requestWillBeSent( requestWillBeSent(
...@@ -457,8 +457,10 @@ SDK.NetworkDispatcher = class { ...@@ -457,8 +457,10 @@ SDK.NetworkDispatcher = class {
// ignores the internally generated |redirectResponse|. The // ignores the internally generated |redirectResponse|. The
// |outerResponse| of SignedExchangeInfo was set to |networkRequest| in // |outerResponse| of SignedExchangeInfo was set to |networkRequest| in
// signedExchangeReceived(). // signedExchangeReceived().
if (!networkRequest.signedExchangeInfo()) if (!networkRequest.signedExchangeInfo()) {
this.responseReceived(requestId, loaderId, time, Protocol.Page.ResourceType.Other, redirectResponse, frameId); this.responseReceived(
requestId, loaderId, time, Protocol.Network.ResourceType.Other, redirectResponse, frameId);
}
networkRequest = this._appendRedirect(requestId, time, request.url); networkRequest = this._appendRedirect(requestId, time, request.url);
this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.RequestRedirected, networkRequest); this._manager.dispatchEventToListeners(SDK.NetworkManager.Events.RequestRedirected, networkRequest);
} else { } else {
...@@ -469,7 +471,7 @@ SDK.NetworkDispatcher = class { ...@@ -469,7 +471,7 @@ SDK.NetworkDispatcher = class {
this._updateNetworkRequestWithRequest(networkRequest, request); this._updateNetworkRequestWithRequest(networkRequest, request);
networkRequest.setIssueTime(time, wallTime); networkRequest.setIssueTime(time, wallTime);
networkRequest.setResourceType( networkRequest.setResourceType(
resourceType ? Common.resourceTypes[resourceType] : Protocol.Page.ResourceType.Other); resourceType ? Common.resourceTypes[resourceType] : Protocol.Network.ResourceType.Other);
this._startNetworkRequest(networkRequest); this._startNetworkRequest(networkRequest);
} }
...@@ -491,7 +493,7 @@ SDK.NetworkDispatcher = class { ...@@ -491,7 +493,7 @@ SDK.NetworkDispatcher = class {
* @param {!Protocol.Network.RequestId} requestId * @param {!Protocol.Network.RequestId} requestId
* @param {!Protocol.Network.LoaderId} loaderId * @param {!Protocol.Network.LoaderId} loaderId
* @param {!Protocol.Network.MonotonicTime} time * @param {!Protocol.Network.MonotonicTime} time
* @param {!Protocol.Page.ResourceType} resourceType * @param {!Protocol.Network.ResourceType} resourceType
* @param {!Protocol.Network.Response} response * @param {!Protocol.Network.Response} response
* @param {!Protocol.Page.FrameId=} frameId * @param {!Protocol.Page.FrameId=} frameId
*/ */
...@@ -586,7 +588,7 @@ SDK.NetworkDispatcher = class { ...@@ -586,7 +588,7 @@ SDK.NetworkDispatcher = class {
* @override * @override
* @param {!Protocol.Network.RequestId} requestId * @param {!Protocol.Network.RequestId} requestId
* @param {!Protocol.Network.MonotonicTime} time * @param {!Protocol.Network.MonotonicTime} time
* @param {!Protocol.Page.ResourceType} resourceType * @param {!Protocol.Network.ResourceType} resourceType
* @param {string} localizedDescription * @param {string} localizedDescription
* @param {boolean=} canceled * @param {boolean=} canceled
* @param {!Protocol.Network.BlockedReason=} blockedReason * @param {!Protocol.Network.BlockedReason=} blockedReason
...@@ -751,7 +753,7 @@ SDK.NetworkDispatcher = class { ...@@ -751,7 +753,7 @@ SDK.NetworkDispatcher = class {
* @param {!Protocol.Network.InterceptionId} interceptionId * @param {!Protocol.Network.InterceptionId} interceptionId
* @param {!Protocol.Network.Request} request * @param {!Protocol.Network.Request} request
* @param {!Protocol.Page.FrameId} frameId * @param {!Protocol.Page.FrameId} frameId
* @param {!Protocol.Page.ResourceType} resourceType * @param {!Protocol.Network.ResourceType} resourceType
* @param {boolean} isNavigationRequest * @param {boolean} isNavigationRequest
* @param {boolean=} isDownload * @param {boolean=} isDownload
* @param {string=} redirectUrl * @param {string=} redirectUrl
...@@ -1219,7 +1221,7 @@ SDK.MultitargetNetworkManager.InterceptedRequest = class { ...@@ -1219,7 +1221,7 @@ SDK.MultitargetNetworkManager.InterceptedRequest = class {
* @param {!Protocol.Network.InterceptionId} interceptionId * @param {!Protocol.Network.InterceptionId} interceptionId
* @param {!Protocol.Network.Request} request * @param {!Protocol.Network.Request} request
* @param {!Protocol.Page.FrameId} frameId * @param {!Protocol.Page.FrameId} frameId
* @param {!Protocol.Page.ResourceType} resourceType * @param {!Protocol.Network.ResourceType} resourceType
* @param {boolean} isNavigationRequest * @param {boolean} isNavigationRequest
* @param {boolean=} isDownload * @param {boolean=} isDownload
* @param {string=} redirectUrl * @param {string=} redirectUrl
......
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