[sync] Enable syncing of standard and custom emulated devices

R=wolfi@chromium.org

Bug: 1245541
Change-Id: I9a96a20cf43df82c623089f1d7911d5373f645a5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3240365
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
This commit is contained in:
Simon Zünd
2021-10-25 09:10:21 +00:00
committed by Devtools-frontend LUCI CQ
parent ede4c59ac3
commit 700db8d40c
@@ -502,12 +502,14 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
constructor() {
super();
this.#standardSetting = Common.Settings.Settings.instance().createSetting('standardEmulatedDeviceList', []);
this.#standardSetting = Common.Settings.Settings.instance().createSetting(
'standardEmulatedDeviceList', [], Common.Settings.SettingStorageType.Synced);
this.#standardInternal = new Set();
this.listFromJSONV1(this.#standardSetting.get(), this.#standardInternal);
this.updateStandardDevices();
this.#customSetting = Common.Settings.Settings.instance().createSetting('customEmulatedDeviceList', []);
this.#customSetting = Common.Settings.Settings.instance().createSetting(
'customEmulatedDeviceList', [], Common.Settings.SettingStorageType.Synced);
this.#customInternal = new Set();
if (!this.listFromJSONV1(this.#customSetting.get(), this.#customInternal)) {
this.saveCustomDevices();