Title: Theory / Important / Chrome / Identity
On every note of this deck, unless a note says otherwise:
Language: Objective-C

Typ: FakeChromeidentity
Meaning: A fake ChromeIdentity used for testing.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity.h;l=13?q=FakeChromeIdentity&ss=chromium/chromium/src
Language: Objective-C
Subtype of: ChromeIdentity

Variable: chromeIdentity.userEmail
Meaning: the email of this user
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity.h
Language: Objective-C
Variables: Chromeidentity fakeChromeIdentity

Variable: chromeIdentity.gaiaID
Meaning: the gaia ID of this user
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity.h
Language: Objective-C
Variables: Chromeidentity fakeChromeIdentity

Variable: chromeIdentity.userFullName
Meaning: the full name of this user
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity.h
Language: Objective-C
Variables: Chromeidentity fakeChromeIdentity

Variable: chromeIdentity.userGivenName
Meaning: the given name of this user
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity.h
Language: Objective-C
Variables: Chromeidentity fakeChromeIdentity

Variable: chromeIdentity.hashedGaiaID
Meaning: the hashed gaia id of this user
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity.h
Language: Objective-C
Variables: Chromeidentity fakeChromeIdentity

Instruction: [FakeChromeIdentity
  encodeIdentitiesToBase64:identities
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity.h;l=13?q=FakeChromeIdentity&ss=chromium/chromium/src
Effect: A string encoding the identities

Instruction: [FakeChromeIdentity
  identitiesFromBase64String:string
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity.h;l=13?q=FakeChromeIdentity&ss=chromium/chromium/src
Returns: Identitier encoded in string

Instruction: [FakeChromeIdentity
  fakeIdentity1
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity.h;l=13?q=FakeChromeIdentity&ss=chromium/chromium/src
Returns: A fake identity

Instruction: [FakeChromeIdentity
  fakeIdentity2
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity.h;l=13?q=FakeChromeIdentity&ss=chromium/chromium/src
Returns: A fake identity distinct from kaeIdentity1

Instruction: [FakeChromeIdentity
  fakeManagedIdentity
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity.h;l=13?q=FakeChromeIdentity&ss=chromium/chromium/src
Returns: A fake managed identity

Instruction: [FakeChromeIdentity
  identityWithEmail:email
  gaiaID:gaiaID
  name:name
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity.h;l=13?q=FakeChromeIdentity&ss=chromium/chromium/src
Returns: A fake identity with specified email, gaiaID and name

Typ: ChromeEarlGreyUIImpl
Meaning: // Test methods that perform actions on Chrome. These methods only affect Chrome
// using the UI with Earl Grey. Used for logging the failure. Compiled in Test
// Process for EG2 and EG1. Can be extended with category methods to provide
// additional test helpers. Category method names must be unique.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Language: Objective-C

Instruction: [chromeEGUIImpl
  openToolsMenu
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Makes the toolbar visible by swiping downward, if necessary. Then taps on the Tools menu button. At least one tab needs to be open and visible when calling this method.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  closeToolsMenu
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Closes the tools menu by tapping on the Tools menu button, or tapping the background scrim, depending on the current version of the tools menu.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openToolsMenuInWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Makes the toolbar visible by swiping downward, if necessary. Then taps on the Tools menu button. At least one tab needs to be open and visible when calling this method.
Sets and Leaves the root matcher to the given window with |windowNumber|.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openSettingsMenu
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Opens the settings menu by opening the tools menu, and then tapping the Settings button. There will be a GREYAssert if the tools menu is open when calling this method.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openSettingsMenuInWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Opens the settings menu by opening the tools menu, and then tapping the Settings button. There will be a GREYAssert if the tools menu is open when calling this method.
Sets and Leaves the root matcher to the given window with |windowNumber|.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openNewTabMenu
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Makes the toolbar visible by swiping downward, if necessary. Then long-presses on the New Tab menu button. At least one tab needs to be open and visible when calling this method.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Assuming: At least one tab should be open.

Instruction: [chromeEGUIImpl
  tapToolsMenuButton:buttonMatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Scrolls to find the button in the Tools menu with the corresponding |buttonMatcher| and then taps it.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If |buttonMatcher| is not found, or the Tools menu is not open when this is called there will be a GREYAssert.

Instruction: [chromeEGUIImpl
  tapToolsMenuAction:buttonMatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Scrolls to find the action in the Tools menu with the corresponding |buttonMatcher|, and then taps it.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If |buttonMatcher| is not found, or
// the Tools menu is not open when this is called there will be a GREYAssert.

Instruction: [chromeEGUIImpl
  tapSettingsMenuButton:buttonMatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Scrolls to find the button in the Settings menu with the corresponding |buttonMatcher|, and then taps it.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If |buttonMatcher| is not found, or the Settings menu is not open when this is called there will be a GREYAssert.

Instruction: [chromeEGUIImpl
  tapPrivacyMenuButton:buttonMatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Scrolls to find the button in the Privacy menu with the corresponding |buttonMatcher|, and then taps it.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If |buttonMatcher| is not found, or the Settings menu is not open when this is called there will be a GREYAssert.

Instruction: [chromeEGUIImpl
  tapPrivacySafeBrowsingMenuButton:buttonMatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Scrolls to find the button in the Privacy Safe Browsing menu with the corresponding |buttonMatcher|, and then taps it.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If |buttonMatcher| is not found, or the Settings menu is not open when this is called there will be a GREYAssert.

Instruction: [chromeEGUIImpl
  tapClearBrowsingDataMenuButton:buttonMatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Scrolls to find the button in the Clear Browsing Data menu with the corresponding |buttonMatcher|, and then taps it.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If |buttonMatcher| is not found, or the menu is not open when this is called there will be a GREYAssert.

Instruction: [chromeEGUIImpl
  tapAccountsButton:buttonMatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Scrolls to find the button in the accounts menu with the corresponding |buttonMatcher|, and then taps it.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If |buttonMatcher| is not found, or the menu is not open when this is called there will be a GREYAssert.

Instruction: [chromeEGUIImpl
  focusOmniboxAndType:text
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Focuses the omnibox by tapping and types |text| into it. The '\n' symbol can be passed in order to commit the string.
If text is empty or nil, the ompnibox is just focused
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  focusOmnibox
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Focuses the omnibox by tapping it
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openNewTab
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Open a new tab via the tools menu
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openTabGrid
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Open the tab grid
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openAndClearBrowsingDataFromHistory
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Opend and clear browsing data from history
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  clearAllBrowsingData
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Clears all browsing data by opening the privacy panel in the settings view.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  assertHistoryHasNoEntries
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Asserts that history is empty
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  reload
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Reloads the page via the reload button, and does not wait for the page to finish loading.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openShareMenu
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Opens the share menu via the share button. This method requires that there is at least one tab open.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  waitForToolbarVisible:isVisible
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Waits for toolbar to become visible if |isVisible| is YES, otherwise waits for it to disappear.
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl
Extra: If the condition is not met within a timeout, a GREYAssert is induced.

Instruction: [chromeEGUIImpl
  waitForAppToIdle
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Wait for app ot idle
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  openPageInfo
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Open pageInfo via the tools menu
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeEGUIImpl
  dismissContextMenuIfPresent
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_ui.h
Effect: Tries to dismiss any presented native context menu.
Returns: Whether a context menu was dismissed
Variables: ChromeEarlGreyUIImpl chromeEGUIImpl

Instruction: [chromeIdentityInteractionManager
  addAccountWithPresentingViewController:viewController
  userEmail:userEmail
  completion:completion
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity_interaction_manager.h
Effect: // If |userEmail| is not set:
// Starts the add account operation for a user. Presents user with the screen to
// enter credentials.
// If |userEmail| is set:
// Starts the reauthentication operation for a user. Presents user with the
// screen to enter credentials with the email pre-entered.
// Note: Calling this method will fail and the completion will be called with a
// CHROME_IDENTITY_OPERATION_ONGOING error if there is already another add
// account or reauthenticate operation ongoing.
// * |viewController| will display the add account screens.
// * |userEmail| will be pre-entered on the presented screen.
// * |completion| will be called once the operation has finished.
Variables: ChromeIdentityInteractionManager chromeIdentityInteractionManager

Instruction: [chromeIdentityInteractionManager
  cancelAddAccountAnimated:animated
  completion:completion
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity_interaction_manager.h
Effect: Cancels and dismisses any currently active operation.
* |animated| represents whether the UI should be dismissed with an animation.
* |completion| will be called once the operation has finished.
Variables: ChromeIdentityInteractionManager chromeIdentityInteractionManager

Typ: ChromeIdentityService
Meaning: abstracts the signin flow on iOS.
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Language: Objective-C

Instruction: chromeIdentityService.HandleSessionOpenURLContexts(scene, url_contexts)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Handles open URL authentication callback.
Returns: whether the URL was actually handled
Variables: ChromeIdentityService chromeIdentityService
Assuming: This should be called within -[<UISceneDelegate> application:openURLContexts:].

Instruction: chromeIdentityService.ApplicationDidDiscardsceneSessions(scene_sessions)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Discards scene session data
Variables: ChromeIdentityService chromeIdentityService
Assuming: This should be called within
 -[<UIApplicationDelegate> application:didDiscardSceneSessions:].

Instruction: chromeIdentityService.DismissDialogs()
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Dismisses all the dialogs created by the abstracted flows.
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.PresentAccountDetailsController(
  identity,
  view_controller,
  animated)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: a block to dismiss the presented view
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.PresentWebAndAppSettingDetailsController(identity, view_controller, animated)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Presents a new Web and App Setting Details view.
|identity| the identity used to present the view.
|view_controller| the view to present the setting details.
|animated| the view is presented with animation if YES.
Returns: a block to dismiss the presented view
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.CreateChromeIdentityInteractionManager()
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: a new ChromeIdentityInteractionManager with |delegate| as its delegate
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.IterateOverIdentities(callback)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Iterates over all known ChromeIdentities, sorted by the ordering used in account manager, which is typically based on the keychain ordering of accounts.
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.ForgetIdentity(identity, callback)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Forgets the given identity on the device. This method logs the user out. Callback is executed on main thread
Variables: ChromeIdentityService chromeIdentityService
Extra: It is asynchronous because it needs to contact the server to revoke the authentication token.

Instruction: chromeIdentityService.GetAccessToken(identity, scopes, callback)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Asynchronously retrieves access tokens for the given identity and scopes. Uses the default client id and client secret.
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.GetAccessToken(
  identity,
  client_id,
  scopes,
  callback
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Asynchronously retrievs access tokens for the given identity and scopes
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.GetCachedAvatarForIdentity(
  identity
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: Synchronously returns any cached avatar, or nil.
Variables: ChromeIdentityService chromeIdentityService
Extra: Generally prefer GetAvatarForIdentity

Instruction: chromeIdentityService.GetHostedDomainForIdentity(
  identity,
  callback
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: Fetches the identity hosted domain, from the cache or the network.
Variables: ChromeIdentityService chromeIdentityService
Extra: Calls back on the main thread.

Instruction: chromeIdentityService.GetCachedHostedDomainForIdentity(
  identity
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: the identity hosted domain, for the cache only
Variables: ChromeIdentityService chromeIdentityService
Extra: //   + nil, if the hosted domain value was yet not fetched from the server.
  //   + an empty string, if this is a consumer account (e.g. foo@gmail.com).
  //   + non-empty string, if the hosted domain was fetched and this account
  //     has a hosted domain.

Instruction: chromeIdentityService.CanOfferExtendedSyncPromos(
  identity,
  callback
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: the value of the account capability that determines whether Chrome should offer extended sync promos to |identity| (via callback)
Variables: ChromeIdentityService chromeIdentityService
Extra: . This value will have a refresh period of 24 hours, meaning that at retrieval it may be stale. If the value is not populated, as in a fresh install, the callback will evaluate to false.

Instruction: chromeIdentityService.IsSubjectToParentalControls(
  identity,
  callback
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: the value of the account capability that determines whether parental controls should be applied to |identity|.
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.IsServiceSupported()
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: Whether the service can be used, and supports ChromeIdentity list.
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.GetMDMDeviceStatus(user_info)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: the MDM device status associated with |user_info|.
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.HandleMDMNotification(
  identity,
  user_info,
  callback
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Handles a potential MDM (Mobile Device Management) notification. If the notificatino linked to |identity| and |user_info| was an MDM, |callback| will be called later with the status of the device.
Returns: Whether the notification linked to |identity| and |user_info| was an MDM one
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.IsMDMError(
  identity,
  error
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: the |error| associated with |identity| is due to MDM (Mobile Device Management).
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.AddObserver(
  observer
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Add observer
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.RemoveObserver(
  observer
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Effect: Remove observer
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService.IsInvalidGrantError(
  user_info
)
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Returns: whether the given |user_info|, from an access token refresh failed event, corresponds to an invalid grant error.
Variables: ChromeIdentityService chromeIdentityService

Instruction: chromeIdentityService
TODO maybe: protected
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Variables: ChromeIdentityService chromeIdentityService

Typ: FakeChromeIdentityInteractionManager
Meaning: A fake ChromeIdentityInteractionManager to use in integration tests.
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Language: Objective-C
Variables: ChromeIdentityService chromeIdentityService
Subtype of: ChromeIdentityInteractionManager

Variable: fakeChromeIdentityInteractionManager.identity
Meaning: Identity that will be returned by the add account method if the dialog is closed successfully.
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Language: Objective-C
Variables: FakeChromeIdentityInteractionManager fakeChromeIdentityInteractionManager

Variable: fakeChromeIdentityInteractionManager.viewControllerPresented
Meaning: Whether the fake add account view is presented
Page: ios/public/provider/chrome/browser/signin/chrome_identity_service.h
Language: Objective-C
Variables: FakeChromeIdentityInteractionManager fakeChromeIdentityInteractionManager

Instruction: [fakeChromeIdentityInteractionManager
  addAccountViewControllerDidTapSignIn
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.h
Effect: Simulates a user tapping the sign-in button.
Variables: FakeChromeIdentityInteractionManager fakeChromeIdentityInteractionManager

Instruction: [fakeChromeIdentityInteractionManager
  addAccountViewControllerDidTapCancel
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.h
Effect: Simulates a user tapping the cancel button
Variables: FakeChromeIdentityInteractionManager fakeChromeIdentityInteractionManager

Instruction: [fakeChromeIdentityInteractionManager
  addAccountViewControllerDidThrowUnhandledError
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.h
Effect: Simulates the user encountering an error not handled by ChromeIdentity.
Variables: FakeChromeIdentityInteractionManager fakeChromeIdentityInteractionManager

Instruction: [fakeChromeIdentityInteractionManager
  addAccountViewControllerDidInterrupt
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.h
Effect: Simulates the add account view being interrupted.
Variables: FakeChromeIdentityInteractionManager fakeChromeIdentityInteractionManager

Constant: kFakeAddAccountViewIdentifier
Meaning: Accessibility identifier for FakeChromeIdentityInteractionManager view.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager_constants.h
Language: Objective-C

Constant: ios::kManagedIdentityEmailSuffix
Meaning: Email suffix used for managed account.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_service_constants.h
Language: Objective-C

Constant: ios::kManagedExampleIdentityEmailSuffix
Meaning: Email suffix of the example managed domain use in some tests.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_service_constants.h
Language: Objective-C

Constant: ios::kAddFakeIdentitiesArg
Meaning: Argument to use when starting FakeChromeIdentityService with a list of FakeChromeIdentity. The value is a NSArray of FakeChromeIdentity encoded.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_service_constants.h
Language: Objective-C
Extra: See +[FakeChromeIdentity encodeIdentitiesToBase64:].

Instruction: ios::GetManagedEmailSuffixes();
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/fake_chrome_identity_service_constants.h
Returns: The suffixes of the emails that are considered as managed.

Typ: ios::provider::SigninErrorCategory
TypMeaning: Can be used to determine whether the error is caused by the user credentials being revoked, deleted or disabled so the appropriate action can be taken.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_error_api.h
Language: Objective-C
Value: kUnknownError,  // Not a signin error
Value2: kNetworkError,                 // Network error, treated as transient.
Value3: kUserCancellationError,        // User cancelation error, treated as no-op.
Value4: kAuthorizationForbiddenError,  // Authorization error, treated as sign-out.
Value5: kAuthorizationError,           // Authorization error, treated as sign-out.

Instruction: ios::provider::CreateUserCancelledSigninError()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_error_api.h
Returns: a new signin error corresponding to user cancelled error.

Instruction: ios::provider::CreateMissingIdentitySigninError()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_error_api.h
Returns: A new signin error corresponding to a missing identity error

Instruction: ios::provider::GetSigninErrorCategory()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_error_api.h
Returns: The signin error category

Instruction: ios::provider::GetSigninDefaultAvatar()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_resources_api.h
Returns: A default avatar to use when an identity is missing one

Instruction: ios::provider::CreateSSOService()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Returns: A new instance of SingleSignOnService
Typ: id<SingleSignOnService>

Instruction: ios::provider::CreateTrustedVaultClientBackend(configuration)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Returns: a new instance of TrustedVaultClientBackend.
Typ: std::unique_ptr<TrustedVaultClientBackend>

Typ: ios::FakeChromeIdentityService
Meaning: A fake ChromeIdentityService used for testing.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Language: Objective-C
Subtype of: ChromeIdentityService

Instruction: fakeChromeIdentityService.CreateFakeChromeIdentityInteractionManager()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Returns: A new fake ChromeIdentityInteractionManager
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.SimulateForgetIdentityFromOtherApp(identity)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Returns: Simulates |identity| removed from another Google app
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.FireChromeIdentityReload()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: Simulates reloading the identities from the keychain by SSOAuth.
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.
  AddManagedIdentities(identitiesName)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: Adds the managed identities given their name.
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.
  AddIdentities(identitiesName)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Returns: Add the identities given their name
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.
  AddIdentity(identity)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: Adds |identity| to the available identities.
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService
Extra: No-op if the identity is already added.

Instruction: fakeChromeIdentityService.
  SetFakeMDMError(true)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: GetAccessToken fakes a MDM error
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.
  SetFakeMDMError(false)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: next call to GetAccessToken() succeed
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.
  SetCapabilities(
    identity,
    capabilities
  )
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: Adds a mapping from the |identity| to the capability name -> capability result value used when calling FetchCapabilities.
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService
Assuming: the |identity| has been added to the available identities.

Instruction: fakeChromeIdentityService.
  WaitForServiceCallbacksToComplete()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: Waits until all asynchronous callbacks have been completed by the service.
Returns: Whether completion is successful
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService

Instruction: fakeChromeIdentityService.
  TriggerIdentityUpdateNotification(identity)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/signin_sso_api.h
Effect: Triggers an update notification for |identity|.
Variables: ios::FakeChromeIdentityService fakeChromeIdentityService