Commit 241875c2 authored by Tien Mai's avatar Tien Mai Committed by Commit Bot

Pass the UI language to Chrome when starting it as GLS of GCPW

- Checks the current thread preferred UI language and pass it onto
Chrome so that it presents itself with a language that matches the
logon screen.

Bug: 908451
Change-Id: I8f40a1501baabfe592cde6eea2c74bd19d47e9df
Reviewed-on: https://chromium-review.googlesource.com/c/1351249Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
Commit-Queue: Tien Mai <tienmai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610860}
parent 8f7d38df
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/values.h" #include "base/values.h"
#include "base/win/current_module.h" #include "base/win/current_module.h"
#include "base/win/i18n.h"
#include "base/win/registry.h" #include "base/win/registry.h"
#include "base/win/scoped_handle.h" #include "base/win/scoped_handle.h"
#include "chrome/credential_provider/common/gcp_strings.h" #include "chrome/credential_provider/common/gcp_strings.h"
...@@ -504,6 +505,16 @@ HRESULT CGaiaCredentialBase::GetGlsCommandline( ...@@ -504,6 +505,16 @@ HRESULT CGaiaCredentialBase::GetGlsCommandline(
command_line->AppendSwitchNative(kGcpwSigninSwitch, email); command_line->AppendSwitchNative(kGcpwSigninSwitch, email);
// Get the current UI language for the logon screen and pass it onto Chrome
// The UI language depends on whether we are using a SYSTEM logon (initial
// logon) or a lock screen logon (from a user). If the user who locked the
// screen has a specific language, that will be the one used for the UI
// language.
std::vector<base::string16> languages;
if (base::win::i18n::GetThreadPreferredUILanguageList(&languages)) {
command_line->AppendSwitchNative("lang", languages[0]);
}
// The gpu process will be running on an alternative desktop since it does not // The gpu process will be running on an alternative desktop since it does not
// have access to the winlogon desktop. This mitigation is required merely to // have access to the winlogon desktop. This mitigation is required merely to
// be able to start Chrome during winlogon. However, In this scenario no gpu // be able to start Chrome during winlogon. However, In this scenario no gpu
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment