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

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: Pass NetworkManager as a ctor parameter, to ensure proper initialization order. Created 4 years, 6 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..99e1efa8885d8ab4778f22eb48111d05f7c6e25e 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);
dgozman 2016/06/29 18:37:57 this._target, not this.target Do we have tests for
eostroukhov-old 2016/06/29 22:54:20 Looks like no tests detect missing toolbar button.
+ 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