From 39fa7a7dd0d9d9d43545cf1413ad7128507c2b4e Mon Sep 17 00:00:00 2001 From: Claudio DeSouza Date: Thu, 19 Dec 2024 00:30:24 +0100 Subject: [PATCH] [cr133] Gaia ID now a unique type Previously this was a common integral, which requires wrapping the user ID into this type now. Chromium change: https://chromium.googlesource.com/chromium/src/+/bee274de563133afa840118c0117889641159a32 commit bee274de563133afa840118c0117889641159a32 Author: Mikel Astiz Date: Mon Dec 16 11:54:31 2024 -0800 Adopt class GaiaId broadly under //chrome except in unit-tests This patch disallows implicit conversion to and from std::string for class GaiaId, improving type safety and fixing a temporary violation of the style guide. Unit-tests and iOS are excluded for now via #ifdef's in gaia_id.h to continue allowing implicit conversion, to reduce the size of this patch and minimize the risk for regressions (as tests continue to pass without changes). Bug: 380416867 --- components/sync/service/brave_sync_auth_manager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/sync/service/brave_sync_auth_manager.cc b/components/sync/service/brave_sync_auth_manager.cc index 6b3dc11c8efd..d03d8ca746ad 100644 --- a/components/sync/service/brave_sync_auth_manager.cc +++ b/components/sync/service/brave_sync_auth_manager.cc @@ -12,6 +12,7 @@ #include "brave/components/brave_sync/network_time_helper.h" #include "brave/components/constants/brave_services_key.h" #include "brave/components/constants/network_constants.h" +#include "google_apis/gaia/gaia_id.h" namespace syncer { @@ -78,7 +79,7 @@ SyncAccountInfo BraveSyncAuthManager::DetermineAccountToUse() const { base::HexEncode(public_key_.data(), public_key_.size()); AccountInfo account_info; account_info.account_id = CoreAccountId::FromString(client_id); - account_info.gaia = client_id; + account_info.gaia = GaiaId(client_id); // about:sync-internals needs space separator in order to confine table // data within specific width. (ex. client_version and encrypted_types) account_info.email =