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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js

Issue 2109813003: [DevTools] No NetworkManager and NetworkLog for v8only mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing code review comments Created 4 years, 5 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/resources/ServiceWorkersView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
index 2ff609166864e2376b0603330d04ff64edf17406..74c4c81cb0a376027199fd532f67d6ee649b4668 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
@@ -37,9 +37,12 @@ WebInspector.ServiceWorkersView.prototype = {
this._toolbar.appendToolbarItem(WebInspector.NetworkConditionsSelector.createOfflineToolbarCheckbox());
var forceUpdate = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Update on reload"), WebInspector.UIString("Force update Service Worker on page reload"), this._manager.forceUpdateOnReloadSetting());
this._toolbar.appendToolbarItem(forceUpdate);
- var fallbackToNetwork = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Bypass for network"), WebInspector.UIString("Bypass Service Worker and load resources from the network"), target.networkManager.bypassServiceWorkerSetting());
- this._toolbar.appendToolbarItem(fallbackToNetwork);
- this._toolbar.appendSpacer();
+ var networkManager = this._target && WebInspector.NetworkManager.fromTarget(this._target);
+ if (networkManager) {
+ var fallbackToNetwork = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Bypass for network"), WebInspector.UIString("Bypass Service Worker and load resources from the network"), networkManager.bypassServiceWorkerSetting());
+ this._toolbar.appendToolbarItem(fallbackToNetwork);
+ this._toolbar.appendSpacer();
+ }
this._showAllCheckbox = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Show all"), WebInspector.UIString("Show all Service Workers regardless of the origin"));
this._showAllCheckbox.inputElement.addEventListener("change", this._updateSectionVisibility.bind(this), false);
this._toolbar.appendToolbarItem(this._showAllCheckbox);

Powered by Google App Engine
This is Rietveld 408576698