Chromium Code Reviews| Index: chrome/browser/android/profiles/profile_downloader_android.cc |
| diff --git a/chrome/browser/android/profiles/profile_downloader_android.cc b/chrome/browser/android/profiles/profile_downloader_android.cc |
| index 9560c8688455da5656f959884ac730a084c5de74..9a95558d7cabbfb8ae719c936961cd99f7900c02 100644 |
| --- a/chrome/browser/android/profiles/profile_downloader_android.cc |
| +++ b/chrome/browser/android/profiles/profile_downloader_android.cc |
| @@ -185,15 +185,13 @@ void StartFetchingAccountInfoFor( |
| Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); |
| const std::string email = |
| base::android::ConvertJavaStringToUTF8(env, jemail); |
| - // TODO(rogerta): the java code will need to pass in the gaia-id |
| - // of the account instead of the email when chrome uses gaia-id as key. |
| - DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED, |
| - AccountTrackerServiceFactory::GetForProfile(profile)-> |
| - GetMigrationState()); |
| - AccountInfoRetriever* retriever = |
| - new AccountInfoRetriever( |
| - profile, gaia::CanonicalizeEmail(gaia::SanitizeEmail(email)), email, |
| - image_side_pixels, is_pre_signin); |
| + AccountTrackerService* account_tracker_service = |
| + AccountTrackerServiceFactory::GetForProfile(profile); |
| + |
| + AccountInfoRetriever* retriever = new AccountInfoRetriever( |
| + profile, |
| + account_tracker_service->FindAccountInfoByEmail(email).account_id, email, |
|
nyquist
2015/08/28 19:18:26
Is FindAccountInfoByEmail guaranteed to find the a
gogerald1
2015/08/28 21:38:46
Yes, it is guaranteed, since ProfileDownloader.jav
|
| + image_side_pixels, is_pre_signin); |
| retriever->Start(); |
| } |