Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js |
| index 4750c082d79e8b4143a10d2c75621c5c25344752..4ce82347fb85d643e3a29f6477fe079a77a154aa 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js |
| @@ -34,6 +34,7 @@ |
| SDK.NetworkRequest = class extends Common.Object { |
| /** |
| * @param {!SDK.NetworkManager} networkManager |
| + * @param {!Protocol.NetworkAgent} networkAgent |
|
caseq
2017/04/29 02:12:53
Do we really need both manager and agent here? It
|
| * @param {!Protocol.Network.RequestId} requestId |
| * @param {string} url |
| * @param {string} documentURL |
| @@ -41,10 +42,11 @@ SDK.NetworkRequest = class extends Common.Object { |
| * @param {!Protocol.Network.LoaderId} loaderId |
| * @param {?Protocol.Network.Initiator} initiator |
| */ |
| - constructor(networkManager, requestId, url, documentURL, frameId, loaderId, initiator) { |
| + constructor(networkManager, networkAgent, requestId, url, documentURL, frameId, loaderId, initiator) { |
| super(); |
| this._networkManager = networkManager; |
| + this._networkAgent = networkAgent; |
| this._requestId = requestId; |
| this.setUrl(url); |
| this._documentURL = documentURL; |
| @@ -1034,7 +1036,7 @@ SDK.NetworkRequest = class extends Common.Object { |
| this._pendingContentCallbacks.length = 0; |
| delete this._contentRequested; |
| } |
| - this._networkManager.target().networkAgent().getResponseBody(this._requestId, onResourceContent.bind(this)); |
| + this._networkAgent.getResponseBody(this._requestId, onResourceContent.bind(this)); |
| } |
| /** |
| @@ -1109,7 +1111,7 @@ SDK.NetworkRequest = class extends Common.Object { |
| } |
| replayXHR() { |
| - this._networkManager.target().networkAgent().replayXHR(this._requestId); |
| + this._networkAgent.replayXHR(this._requestId); |
| } |
| /** |