[Profiles] Improve random selection of colors for new profiles
This CL improves the algorithm of color selection to disallow colors that are taken by other profiles. To this end, logic to generate ProfileThemeColors is consolidated in profile_colors_util.h. The exact same logic is then used to generate ProfileThemeColors from the list of all predefined profile colors. A next CL will improve the logic further: to exclude the first line of predefined profile colors (unless all colors are taken) and to prefer colors on the same line (for sign-in interception). Bug: 1108295 Change-Id: I6ed155dfa4376ea195e1a5a0f51586319d5ad0ed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2529123 Commit-Queue: Jan Krcal <jkrcal@chromium.org> Reviewed-by:David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#826295}
Showing
Please register or sign in to comment