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

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: rebased 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
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkManager.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 618f878b080547bce5b87b6417de40cfca2dd7c2..ac46d834ad5a9509eae3114af6b5d9b3b6a08fbf 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 = "";
@@ -390,16 +392,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;
},
/**
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkManager.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698