Index: chrome/common/extensions/api/identity.idl |
diff --git a/chrome/common/extensions/api/identity.idl b/chrome/common/extensions/api/identity.idl |
index b4bbe93a585b18810350639291ae8870940b64c7..31812eb803f1cb5f3243c22acc24920baa045588 100644 |
--- a/chrome/common/extensions/api/identity.idl |
+++ b/chrome/common/extensions/api/identity.idl |
@@ -11,6 +11,17 @@ namespace identity { |
DOMString id; |
}; |
+ dictionary ProfileUserInfo { |
+ // An email address for the user account signed into the current |
+ // profile. Empty if the user is not signed in. |
+ DOMString email; |
+ |
+ // A unique identifier for the account. This ID will not change |
+ // for the lifetime of the account. Empty if the user is not |
+ // signed in. |
+ DOMString id; |
+ }; |
+ |
dictionary TokenDetails { |
// Fetching a token may require the user to sign-in to Chrome, or |
// approve the application's requested scopes. If the interactive |
@@ -54,6 +65,7 @@ namespace identity { |
callback GetAuthTokenCallback = void (optional DOMString token); |
callback GetAccountsCallback = void (AccountInfo[] accounts); |
+ callback GetProfileUserInfoCallback = void (ProfileUserInfo userInfo); |
callback InvalidateAuthTokenCallback = void (); |
callback LaunchWebAuthFlowCallback = void (optional DOMString responseUrl); |
@@ -85,6 +97,14 @@ namespace identity { |
static void getAuthToken(optional TokenDetails details, |
GetAuthTokenCallback callback); |
+ // Retrieves email address and obfuscated gaia id of the user |
+ // signed into a profile. |
+ // |
+ // This API is different from identity.getAccounts in two |
+ // ways. The information returned is available offline, and it |
+ // only applies to the primary account for the profile. |
+ static void getProfileUserInfo(GetProfileUserInfoCallback callback); |
+ |
// Removes an OAuth2 access token from the Identity API's token cache. |
// |
// If an access token is discovered to be invalid, it should be |