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

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/Settings.js

Issue 2150713002: [Devtools] Refactor NetworkLogViewColumns to be dynamic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/common/Settings.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Settings.js b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
index b5e159e9f3cc7f6f996e232df35da8a6b8a36d07..5f12cc70fbe97ab3b790ee827c79642e14304a5b 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/Settings.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
@@ -399,7 +399,7 @@ WebInspector.VersionController = function()
}
WebInspector.VersionController._currentVersionName = "inspectorVersion";
-WebInspector.VersionController.currentVersion = 18;
+WebInspector.VersionController.currentVersion = 19;
WebInspector.VersionController.prototype = {
updateVersion: function()
@@ -700,6 +700,33 @@ WebInspector.VersionController.prototype = {
setting.set(newValue);
},
+ _updateVersionFrom18To19: function()
+ {
+ var defaultColumns = {
+ status: true,
+ type: true,
+ initiator: true,
+ size: true,
+ time: true
+ };
+ var visibleColumnSettings = WebInspector.settings.createSetting("networkLogColumnsVisibility", defaultColumns);
+ var visibleColumns = visibleColumnSettings.get();
+ visibleColumns.name = true;
+ visibleColumns.timeline = true;
+
+ var configs = {};
+ for (var columnId in visibleColumns) {
+ if (!visibleColumns.hasOwnProperty(columnId))
+ continue;
+ configs[columnId.toLowerCase()] = {
+ visible: visibleColumns[columnId]
+ };
+ }
+ var newSetting = WebInspector.settings.createSetting("networkLogColumns", {});
+ newSetting.set(configs);
+ visibleColumnSettings.remove();
+ },
+
_migrateSettingsFromLocalStorage: function()
{
// This step migrates all the settings except for the ones below into the browser profile.
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698