Index: third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
index e3eda70ec4c1382bcd4dd31871f89dbe12c32063..92b093d4f5e9a945cf3548b05aff9353a62d7fdb 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
@@ -107,6 +107,29 @@ Network.NetworkPanel = class extends UI.Panel { |
this._networkLogView.addEventListener(Network.NetworkLogView.Events.UpdateRequest, this._onUpdateRequest, this); |
Components.DataSaverInfobar.maybeShowInPanel(this); |
+ |
+ var manager = SDK.multitargetNetworkManager; |
+ manager.on(SDK.MultitargetNetworkManager.RequestBlockingEnabledChangedEvent, updateIconVisibility.bind(this)); |
+ manager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged, updateIconVisibility.bind(this)); |
+ var blockedURLsSetting = Common.moduleSetting('networkBlockedURLs'); |
+ blockedURLsSetting.addChangeListener(updateIconVisibility.bind(this)); |
+ |
+ updateIconVisibility.call(this); |
+ |
+ /** |
+ * @this {Network.NetworkPanel} |
+ */ |
+ function updateIconVisibility() { |
+ var icon = null; |
+ if (manager.isThrottling()) { |
+ icon = UI.Icon.create('smallicon-warning'); |
+ icon.title = Common.UIString('Network throttling is enabled'); |
+ } else if (SDK.multitargetNetworkManager.isRequestBlockingEnabled() && blockedURLsSetting.get().length) { |
+ icon = UI.Icon.create('smallicon-warning'); |
+ icon.title = Common.UIString('Requests may be blocked'); |
+ } |
+ UI.inspectorView.setPanelIcon(this.name, icon); |
+ } |
} |
/** |