In the implementation of chrome.identit.getAuthToken(), GaiaWebAuthFlow is used to obtain user consent when necessary.
GaiaWebAuthFlow performs a merge session, using UbertokenFetcher and GaiaAuthFetcher directly. As described in crbug.com/729591 , this is a blocker to eliminating the dependence of the identity extension API implementation on ProfileOAuth2TokenService. This class can serve as a concrete initial use case for determining the solution to crbug.com/729591 .
I'm not 100% clear on *why* this class performs a merge session. I think it's because it goes through the user consent flow in a webpage, requiring that the user be signed in on the web to work as expected.
Comment 1 by dtapu...@chromium.org
, Dec 7 2017