Correct the parsing of the XDG_CURRENT_DESKTOP
The XDG_CURRENT_DESKTOP could contain multiple values in priority order separated by colon. Go through them in the loop and return on the first one that we recognize/support. The previous state was causing problems with Chrome on the GNOME Classic mode (used in Red Hat Enterprise Linux 7) where the users with multiple Google accounts set in Chrome couldn't switch between them - only one was shown in the account switcher in i.e. GMail. The reason for that was that the XDG_CURRENT_DESKTOP's value GNOME:GNOME-Classic was parsed as not as base::nix::DesktopEnvironment::DESKTOP_ENVIRONMENT_GNOME. base: :nix::DesktopEnvironment::DESKTOP_ENVIRONMENT_OTHER and Change-Id: I122f24fd1cf5a0f932c3fccd5220152a9944609d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1541077Reviewed-by:Lei Zhang <thestig@chromium.org> Reviewed-by:
Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Tomáš Popela <tomas.popela@gmail.com> Cr-Commit-Position: refs/heads/master@{#645224}
Showing
Please register or sign in to comment