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

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

Issue 2938503002: DevTools: unify Network & CPU throttling (Closed)
Patch Set: fmt Created 3 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/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 2b9a115cb4c8395c8c9a09702f30bb34bb8f3693..325f442a4b5627fff51fb1d9c4d85819b556784e 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/Settings.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
@@ -783,6 +783,13 @@ Common.VersionController = class {
networkLogColumnsSetting.set(columns);
}
+ _updateVersionFrom25To26() {
+ var oldSetting = Common.settings.createSetting('customNetworkConditions', []);
+ var newSetting = Common.settings.createSetting('customThrottlingConditions', []);
+ newSetting.set(oldSetting.get().map(setting => Object.assign({cpuThrottlingRate: 1}, setting)));
+ oldSetting.remove();
+ }
+
_migrateSettingsFromLocalStorage() {
// This step migrates all the settings except for the ones below into the browser profile.
var localSettings = new Set([
@@ -815,7 +822,7 @@ Common.VersionController = class {
};
Common.VersionController._currentVersionName = 'inspectorVersion';
-Common.VersionController.currentVersion = 25;
+Common.VersionController.currentVersion = 26;
/**
* @type {!Common.Settings}

Powered by Google App Engine
This is Rietveld 408576698