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

Unified Diff: Source/devtools/front_end/network/NetworkDataGridNode.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
Index: Source/devtools/front_end/network/NetworkDataGridNode.js
diff --git a/Source/devtools/front_end/network/NetworkDataGridNode.js b/Source/devtools/front_end/network/NetworkDataGridNode.js
index c62403cc51f47dc7a29676677a0d1f27b2fc5d42..484c7ee04d0408445f626a458c764115674782a5 100644
--- a/Source/devtools/front_end/network/NetworkDataGridNode.js
+++ b/Source/devtools/front_end/network/NetworkDataGridNode.js
@@ -261,7 +261,7 @@ WebInspector.NetworkDataGridNode.prototype = {
{
cell.classList.toggle("network-dim-cell", !this._isFailed() && (this._request.cached() || !this._request.statusCode));
- if (this._request.failed && !this._request.canceled && !this._request.blocked) {
+ if (this._request.failed && !this._request.canceled && !this._request.wasBlocked()) {
var failText = WebInspector.UIString("(failed)");
if (this._request.localizedFailDescription) {
cell.createTextChild(failText);
@@ -279,8 +279,26 @@ WebInspector.NetworkDataGridNode.prototype = {
cell.setTextAndTitle(WebInspector.UIString("(data)"));
} else if (this._request.canceled) {
cell.setTextAndTitle(WebInspector.UIString("(canceled)"));
- } else if (this._request.blocked) {
- cell.setTextAndTitle(WebInspector.UIString("(blocked)"));
+ } else if (this._request.wasBlocked()) {
+ var reason = WebInspector.UIString("other");
+ switch (this._request.blockedReason()) {
+ case NetworkAgent.BlockedReason.Csp:
+ reason = WebInspector.UIString("csp");
+ break;
+ case NetworkAgent.BlockedReason.MixedContent:
+ reason = WebInspector.UIString("mixed-content");
+ break;
+ case NetworkAgent.BlockedReason.Origin:
+ reason = WebInspector.UIString("origin");
+ break;
+ case NetworkAgent.BlockedReason.Inspector:
+ reason = WebInspector.UIString("devtools");
+ break;
+ case NetworkAgent.BlockedReason.Other:
+ reason = WebInspector.UIString("other");
+ break;
+ }
+ cell.setTextAndTitle(WebInspector.UIString("(blocked:%s)", reason));
} else if (this._request.finished) {
cell.setTextAndTitle(WebInspector.UIString("Finished"));
} else {
« no previous file with comments | « Source/devtools/front_end/network/BlockedURLsPane.js ('k') | Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698