Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js

Issue 2626553002: [Devtools][Code health] Changed NetworkRequest.url to proper getter/setter (Closed)
Patch Set: changes Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
index 2f35fb65213c5fce3a6f81aac4f0b7cb0ec75c2a..04fe7a61b52444a31d473500fa67e45d8e2ab168 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
@@ -40,7 +40,9 @@ SDK.NetworkLog = class extends SDK.SDKModel {
constructor(target, resourceTreeModel, networkManager) {
super(SDK.NetworkLog, target);
+ /** @type {!Array<!SDK.NetworkRequest>} */
this._requests = [];
+ /** @type {!Object<string, !SDK.NetworkRequest>} */
this._requestForId = {};
networkManager.addEventListener(SDK.NetworkManager.Events.RequestStarted, this._onRequestStarted, this);
resourceTreeModel.addEventListener(
@@ -97,7 +99,7 @@ SDK.NetworkLog = class extends SDK.SDKModel {
*/
requestForURL(url) {
for (var i = 0; i < this._requests.length; ++i) {
- if (this._requests[i].url === url)
+ if (this._requests[i].url() === url)
return this._requests[i];
}
return null;
@@ -177,7 +179,7 @@ SDK.PageLoad = class {
*/
constructor(mainRequest) {
this.id = ++SDK.PageLoad._lastIdentifier;
- this.url = mainRequest.url;
+ this.url = mainRequest.url();
this.startTime = mainRequest.startTime;
}
};

Powered by Google App Engine
This is Rietveld 408576698