Send OnPrimaryAccountSet() on ChromeOS

Conceptually, we have long thought of the primary account as being
immutable on ChromeOS. To reflect this conceptual understanding, the
observer notifications for the primary account being set/cleared are
never fired on ChromeOS.

Notwithstanding the above conceptual reality, in practice the primary
account is set on ChromeOS. The reason is simple: after the Profile is
created along with the infrastructure for managing Gaia identities,
ChromeOS-specific code configures the browser’s primary account to be
the account used to log into the device.

This CL introduces the firing of the
IdentityManager::Observer::OnPrimaryAccountSet() notification on
ChromeOS when the primary account is set, thus reflecting the reality
that the primary account in practice is set on this platform.

Note that the primary account is never cleared on ChromeOS, so there is
no need to introducing firing of that notification on this platform.

Design doc for the full effort of rationalizing setting of the primary
account on ChromeOS is here:

Change-Id: I5fd69ea256a1653ea6a59261cf1f2da5ac435ed6
Bug: 814787
Commit-Queue: Colin Blundell <>
Reviewed-by: Xiyuan Xia <>
Reviewed-by: Mihai Sardarescu <>
Reviewed-by: Marc Treib <>
Cr-Commit-Position: refs/heads/master@{#643379}
3 files changed