Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/android/profiles/profile_downloader_android.h" | 5 #include "chrome/browser/android/profiles/profile_downloader_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 186 const JavaParamRef<jobject>& jprofile, | 186 const JavaParamRef<jobject>& jprofile, |
| 187 const JavaParamRef<jstring>& jemail, | 187 const JavaParamRef<jstring>& jemail, |
| 188 jint image_side_pixels, | 188 jint image_side_pixels, |
| 189 jboolean is_pre_signin) { | 189 jboolean is_pre_signin) { |
| 190 Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); | 190 Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); |
| 191 const std::string email = | 191 const std::string email = |
| 192 base::android::ConvertJavaStringToUTF8(env, jemail); | 192 base::android::ConvertJavaStringToUTF8(env, jemail); |
| 193 AccountTrackerService* account_tracker_service = | 193 AccountTrackerService* account_tracker_service = |
| 194 AccountTrackerServiceFactory::GetForProfile(profile); | 194 AccountTrackerServiceFactory::GetForProfile(profile); |
| 195 | 195 |
| 196 AccountInfo account_info = | |
|
newt (away)
2016/02/09 23:08:12
Is this supposed to be here? If so, why / what is
PEConn
2016/02/11 14:44:56
This catches the issue where the AccountTrackerSer
| |
| 197 account_tracker_service->FindAccountInfoByEmail(email); | |
| 198 | |
| 199 if (account_info.account_id.empty()) { | |
| 200 LOG(ERROR) << "Could not get valid account information for " << email; | |
| 201 return; | |
| 202 } | |
| 203 | |
| 196 AccountInfoRetriever* retriever = new AccountInfoRetriever( | 204 AccountInfoRetriever* retriever = new AccountInfoRetriever( |
| 197 profile, | 205 profile, |
| 198 account_tracker_service->FindAccountInfoByEmail(email).account_id, email, | 206 account_tracker_service->FindAccountInfoByEmail(email).account_id, email, |
| 199 image_side_pixels, is_pre_signin); | 207 image_side_pixels, is_pre_signin); |
| 200 retriever->Start(); | 208 retriever->Start(); |
| 201 } | 209 } |
| 202 | 210 |
| 203 // static | 211 // static |
| 204 bool RegisterProfileDownloader(JNIEnv* env) { | 212 bool RegisterProfileDownloader(JNIEnv* env) { |
| 205 return RegisterNativesImpl(env); | 213 return RegisterNativesImpl(env); |
| 206 } | 214 } |
| OLD | NEW |