| Index: chrome/browser/extensions/api/identity/account_tracker.cc
|
| diff --git a/chrome/browser/extensions/api/identity/account_tracker.cc b/chrome/browser/extensions/api/identity/account_tracker.cc
|
| index c372a0b27151768584b42dd8b817a21c461de067..95155e3763ac8f024c041d253cec574c8a96ccd8 100644
|
| --- a/chrome/browser/extensions/api/identity/account_tracker.cc
|
| +++ b/chrome/browser/extensions/api/identity/account_tracker.cc
|
| @@ -206,6 +206,16 @@ std::string AccountTracker::GetAccountId() const {
|
| return account_errors_.begin()->first;
|
| }
|
|
|
| +std::string AccountTracker::GetUsername() const {
|
| + if (account_errors_.size() > 0) {
|
| + std::map<std::string, AccountState>::const_iterator it =
|
| + accounts_.find(account_errors_.begin()->first);
|
| + if (it != accounts_.end())
|
| + return it->second.ids.email;
|
| + }
|
| + return std::string();
|
| +}
|
| +
|
| GoogleServiceAuthError AccountTracker::GetAuthStatus() const {
|
| if (account_errors_.size() == 0)
|
| return GoogleServiceAuthError::AuthErrorNone();
|
|
|