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

Unified Diff: Source/devtools/front_end/sdk/NetworkRequest.js

Issue 1315043008: [DevTools] Show blocked requests in Network panel. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: hidden Created 5 years, 3 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: Source/devtools/front_end/sdk/NetworkRequest.js
diff --git a/Source/devtools/front_end/sdk/NetworkRequest.js b/Source/devtools/front_end/sdk/NetworkRequest.js
index e59c14fc2a92043dc6e59aed6b41558bd7135a79..6c717b1236d3ad9893027a2d6cd3cfb8951a8731 100644
--- a/Source/devtools/front_end/sdk/NetworkRequest.js
+++ b/Source/devtools/front_end/sdk/NetworkRequest.js
@@ -54,6 +54,8 @@ WebInspector.NetworkRequest = function(target, requestId, url, documentURL, fram
this._issueTime = -1;
this._startTime = -1;
this._endTime = -1;
+ /** @type {!NetworkAgent.BlockedReason|undefined} */
+ this._blockedReason = undefined;
this.statusCode = 0;
this.statusText = "";
@@ -386,16 +388,27 @@ WebInspector.NetworkRequest.prototype = {
},
/**
- * @return {boolean}
+ * @return {!NetworkAgent.BlockedReason|undefined}
*/
- get blocked()
+ blockedReason: function()
{
- return this._blocked;
+ return this._blockedReason;
},
- set blocked(x)
+ /**
+ * @param {!NetworkAgent.BlockedReason} reason
+ */
+ setBlockedReason: function(reason)
+ {
+ this._blockedReason = reason;
+ },
+
+ /**
+ * @return {boolean}
+ */
+ wasBlocked: function()
{
- this._blocked = x;
+ return !!this._blockedReason;
},
/**

Powered by Google App Engine
This is Rietveld 408576698