[go: nahoru, domu]

Move "Apps" sync toggle to OS settings on Chrome OS

For SplitSettingsSync we decided that the OS sync settings "Apps"
toggle should control all app types (Chrome Apps, PWAs, ARC++ apps)
and the browser's "Apps" toggle should be hidden.

Therefore on Chrome OS with SplitSettingsSync:
* Make UserSelectableType::kApps have an empty ModelType set
* Make UserSelectableOsType::kOsApps have all app types
* Run ModelType syncer::APPS in sync transport-only mode, controlled
  by the OS sync feature pref.

The browser sync settings UI automatically hides the toggle, because
APPS is no longer a registered selectable (non-OS) type and the
HTML/JS layer already hides non-registered types. We may later change
the browser UI to have a helpful link to OS settings for apps, but
this works for now.

Manual test:
Run chrome --enable-features=SplitSettingsSync,SyncManualStartChromeOS
Add an account
Enable OS sync in the first-run dialog
Verify that the account's apps appear, and chrome://sync-internals
shows Apps are syncing, even though browser sync is off.

Also added automated tests to sync_integration_tests and
components_unittests.

Bug: 1031549

Change-Id: I7de7cfe09b5244053cb8ab1bd69a34c33d9e83c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1964639
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#724648}
13 files changed