Commit 6e8a4679 authored by Joel Hockey's avatar Joel Hockey Committed by Chromium LUCI CQ

Add cros_user_id_hash to LacrosInitParams

CROS_USER_ID_HASH is required to be set into the crosh env.

Bug: 1161413
Change-Id: I07de2348f0c40db1f6443777cd2979343e9b08f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2607981
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840386}
parent 5c2ff62a
......@@ -23,6 +23,7 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/policy/profile_policy_connector.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
......@@ -99,6 +100,8 @@ mojom::LacrosInitParamsPtr GetLacrosInitParams(
// the long term fix is made in ash-chrome, atomically.
params->exo_ime_support =
crosapi::mojom::ExoImeSupport::kConsumedByImeWorkaround;
params->cros_user_id_hash = chromeos::ProfileHelper::GetUserIdHashFromProfile(
ProfileManager::GetPrimaryUserProfile());
return params;
}
......
......@@ -210,7 +210,7 @@ enum ExoImeSupport {
// If ash-chrome is newer than lacros-chrome, then some fields may not be
// processed by lacros-chrome.
//
// Next version: 10
// Next version: 11
[Stable]
struct LacrosInitParams {
// This is ash-chrome's version of the AshChromeService interface. This is
......@@ -272,6 +272,11 @@ struct LacrosInitParams {
// depending on the ash-chrome's support status via this flag.
[MinVersion=9]
ExoImeSupport exo_ime_support@9;
// Primary user ID hash. Used to set CROS_USER_ID_HASH env var in crosh.
// Do not use this to construct paths, use DefaultPaths for that purpose.
[MinVersion=10]
string? cros_user_id_hash@10;
};
// LacrosChromeService defines the APIs that live in lacros-chrome and
......
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