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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js

Issue 2603593002: Expose per-request referrer policy in devtools (Closed)
Patch Set: updates Created 3 years, 12 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/network/RequestHeadersView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js b/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js
index d8e03ed94d9a10199f38a805e985e7c64de56ae7..254fb5b1e2d38935cff150b11c3bd41491df4f13 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js
@@ -60,6 +60,8 @@ Network.RequestHeadersView = class extends UI.VBox {
this._statusCodeItem = generalCategory.createLeaf();
this._remoteAddressItem = generalCategory.createLeaf();
this._remoteAddressItem.hidden = true;
+ this._referrerPolicyItem = generalCategory.createLeaf();
+ this._referrerPolicyItem.hidden = true;
this._responseHeadersCategory = new Network.RequestHeadersView.Category(root, 'responseHeaders', '');
this._requestHeadersCategory = new Network.RequestHeadersView.Category(root, 'requestHeaders', '');
@@ -85,6 +87,7 @@ Network.RequestHeadersView = class extends UI.VBox {
this._refreshResponseHeaders();
this._refreshHTTPInformation();
this._refreshRemoteAddress();
+ this._refreshReferrerPolicy();
}
/**
@@ -447,6 +450,14 @@ Network.RequestHeadersView = class extends UI.VBox {
treeElement.title = this._formatHeader(Common.UIString('Remote Address'), remoteAddress);
}
+ _refreshReferrerPolicy() {
+ var referrerPolicy = this._request.referrerPolicy();
+ var treeElement = this._referrerPolicyItem;
+ treeElement.hidden = !referrerPolicy;
+ if (referrerPolicy)
+ treeElement.title = this._formatHeader(Common.UIString('Referrer Policy'), referrerPolicy);
+ }
+
/**
* @param {!Event} event
*/

Powered by Google App Engine
This is Rietveld 408576698