| Index: components/signin/core/browser/mutable_profile_oauth2_token_service.cc
|
| diff --git a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc
|
| index a9e4442911008541480af2cf26eaabcb3ca43aa2..fc28a0a686d0e6c8d1e667e364d420eb86bbce03 100644
|
| --- a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc
|
| +++ b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc
|
| @@ -9,6 +9,7 @@
|
| #include "components/signin/core/browser/webdata/token_web_data.h"
|
| #include "components/webdata/common/web_data_service_base.h"
|
| #include "google_apis/gaia/gaia_auth_fetcher.h"
|
| +#include "google_apis/gaia/gaia_auth_util.h"
|
| #include "google_apis/gaia/gaia_constants.h"
|
| #include "google_apis/gaia/google_service_auth_error.h"
|
| #include "google_apis/gaia/oauth2_access_token_fetcher_impl.h"
|
| @@ -243,10 +244,16 @@ void MutableProfileOAuth2TokenService::LoadAllCredentialsIntoMemory(
|
| } else {
|
| DCHECK(!refresh_token.empty());
|
| std::string account_id = RemoveAccountIdPrefix(prefixed_account_id);
|
| +
|
| + // If the account_id is an email address, then canonicalize it. This
|
| + // is to support legacy account_ids, and will not be needed after
|
| + // switching to gaia-ids.
|
| + if (account_id.find('@') != std::string::npos)
|
| + account_id = gaia::CanonicalizeDomain(account_id);
|
| +
|
| refresh_tokens()[account_id].reset(
|
| new AccountInfo(this, account_id, refresh_token));
|
| FireRefreshTokenAvailable(account_id);
|
| - // TODO(fgorski): Notify diagnostic observers.
|
| }
|
| }
|
|
|
|
|