Skip to content

Commit

Permalink
[cr133] Gaia ID now a unique type
Browse files Browse the repository at this point in the history
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 <[email protected]>
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
  • Loading branch information
cdesouza-chromium committed Dec 19, 2024
1 parent 39a6d38 commit 39fa7a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/sync/service/brave_sync_auth_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 39fa7a7

Please sign in to comment.