dpwa: Clean up fallout from user_display_mode migration bug
This is a follow up CL to https://chromium-review.googlesource.com/c/chromium/src/+/2392168.
Background:
The above CL fixes a bug that caused bookmark app -> BMO migration to
set the user_display_mode to kBrowser for non locally installed apps.
The bug fix unfortunately doesn't fix the effects of that bug for users
that ran the migration code bug.
Change:
This CL specifically looks for users affected by the bug (where their
bookmark app is set to open in a window while the BMO app is set to
open in a tab) and re-migrates their bookmark app user_display_mode.
Known issues:
- If the user sets their user_display_mode to open in browser tab
after migration and before the clean up runs it will be reverted
back to window (this is indistinguishable from the migration bug
but should be rare).
- This won't run for users with sync disabled (though they are
unlikely to have this bug as sync is required to have
non-locally installed bookmark apps).
Bug: 1127128
Change-Id: I4268fbf450760b0ef1403be209d1983fd83a8b17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391704
Commit-Queue: Alan Cutter <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Reviewed-by: Alexey Baskakov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#806888}
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 7fc0c82..4b0f7c5a 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -674,6 +674,13 @@
"Persist the throttling of local PWA manifest update checks across browser "
"restarts.";
+const char kDesktopPWAsMigrationUserDisplayModeCleanUpName[] =
+ "Desktop PWAs migration user_display_mode clean up";
+const char kDesktopPWAsMigrationUserDisplayModeCleanUpDescription[] =
+ "Runs clean up code to fix web apps that had their window/browser tab "
+ "launch preference incorrectly migrated. See issue "
+ "https://crbug.com/1125020.";
+
const char kDesktopPWAsAppIconShortcutsMenuName[] =
"Desktop PWAs app icon shortcuts menu";
const char kDesktopPWAsAppIconShortcutsMenuDescription[] =