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

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

Issue 2914033002: [Devtools] NetworkLogView now uses NetworkLog as source of truth. (Closed)
Patch Set: [Devtools] NetworkLogView now uses NetworkLog as source of truth. Created 3 years, 7 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/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 85b28e5d6d0f52ef1b1fa011e813566e2f927992..3094ca94709656db95cf08307037697b1e4c7936 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js
@@ -108,7 +108,9 @@ Network.NetworkPanel = class extends UI.Panel {
Network.NetworkLogView.Events.SearchCountUpdated, this._onSearchCountUpdated, this);
this._networkLogView.addEventListener(
Network.NetworkLogView.Events.SearchIndexUpdated, this._onSearchIndexUpdated, this);
- this._networkLogView.addEventListener(Network.NetworkLogView.Events.UpdateRequest, this._onUpdateRequest, this);
+ NetworkLog.networkLog.addEventListener(NetworkLog.NetworkLog.Events.RequestUpdated, this._onUpdateRequest, this);
+ NetworkLog.networkLog.addEventListener(NetworkLog.NetworkLog.Events.Reset, this._onNetworkLogReset, this);
+
Components.DataSaverInfobar.maybeShowInPanel(this);
}
@@ -145,7 +147,7 @@ Network.NetworkPanel = class extends UI.Panel {
this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleRecordAction));
this._clearButton = new UI.ToolbarButton(Common.UIString('Clear'), 'largeicon-clear');
- this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._onClearButtonClicked, this);
+ this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, () => NetworkLog.networkLog.reset());
this._panelToolbar.appendToolbarItem(this._clearButton);
this._panelToolbar.appendSeparator();
var recordFilmStripButton = new UI.ToolbarSettingToggle(
@@ -202,7 +204,7 @@ Network.NetworkPanel = class extends UI.Panel {
_toggleRecording() {
if (!this._preserveLogSetting.get() && !this._toggleRecordAction.toggled())
- this._reset();
+ NetworkLog.networkLog.reset();
this._toggleRecord(!this._toggleRecordAction.toggled());
}
@@ -238,17 +240,9 @@ Network.NetworkPanel = class extends UI.Panel {
this._networkLogView.addFilmStripFrames(timestamps);
}
- /**
- * @param {!Common.Event} event
- */
- _onClearButtonClicked(event) {
- this._reset();
- }
-
- _reset() {
+ _onNetworkLogReset() {
this._calculator.reset();
this._overviewPane.reset();
- this._networkLogView.reset();
Network.BlockedURLsPane.reset();
if (this._filmStripView)
this._resetFilmStripView();
@@ -258,8 +252,6 @@ Network.NetworkPanel = class extends UI.Panel {
* @param {!Common.Event} event
*/
_willReloadPage(event) {
- if (!this._preserveLogSetting.get())
- this._reset();
dgozman 2017/06/01 20:56:28 Where did this go?
allada 2017/06/02 01:02:43 It's in NetworkLog now and _onNetworkLogReset gets
this._toggleRecord(true);
if (this._pendingStopTimer) {
clearTimeout(this._pendingStopTimer);

Powered by Google App Engine
This is Rietveld 408576698