0
Files
src/google_apis
Mikel Astiz 4ac6f5a946 [ios] Adopt class GaiaId for improved type safety
The class replaces std::string to avoid bugs when dealing with
obfuscated gaia IDs. The class wraps an std::string and is in most
cases a drop-in replacement.

This patch targets C++ code specifically and exclude tests to make
the patch smaller. Follow-up patches may look into adopting it more
broadly under iOS, e.g. in tests as well as (optionally) in
ios/chrome/browser/signin/model/system_identity.h.

Class GaiaId is extended (on iOS only) with explicit conversion to
and from NSString, which is fairly common on iOS and avoids
boilerplate in many calling sites that otherwise needed to invoke
functions like `base::SysUTF8ToNSString()`.

Bug: 380416867
Change-Id: Idf64fd1a9233f1a4b25a029cec8dbc86e62618f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069987
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1407406}
2025-01-16 10:00:37 -08:00
..