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 635689d702cb825af1d8e467b79e72d26467cef2..eba72f11037cbcaf8103f86fbafce936145201f9 100644 |
--- a/chrome/browser/android/profiles/profile_downloader_android.cc |
+++ b/chrome/browser/android/profiles/profile_downloader_android.cc |
@@ -193,6 +193,15 @@ void StartFetchingAccountInfoFor(JNIEnv* env, |
AccountTrackerService* account_tracker_service = |
AccountTrackerServiceFactory::GetForProfile(profile); |
+ AccountInfo account_info = |
+ account_tracker_service->FindAccountInfoByEmail(email); |
+ |
+ if (account_info.account_id.empty()) { |
+ LOG(ERROR) << "Attempted to get AccountInfo for account not in the " |
+ << "AccountTrackerService"; |
+ return; |
+ } |
+ |
AccountInfoRetriever* retriever = new AccountInfoRetriever( |
profile, |
account_tracker_service->FindAccountInfoByEmail(email).account_id, email, |