Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/android/profiles/profile_downloader_android.cc

Issue 1574273002: Unify and Improve the Sign-In and Sync Confirmation Screens on Clank. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 =
197 account_tracker_service->FindAccountInfoByEmail(email);
198
199 if (account_info.account_id.empty()) {
200 LOG(ERROR) << "Attempted to get AccountInfo for account not in the "
201 << "AccountTrackerService";
202 return;
203 }
204
196 AccountInfoRetriever* retriever = new AccountInfoRetriever( 205 AccountInfoRetriever* retriever = new AccountInfoRetriever(
197 profile, 206 profile,
198 account_tracker_service->FindAccountInfoByEmail(email).account_id, email, 207 account_tracker_service->FindAccountInfoByEmail(email).account_id, email,
199 image_side_pixels, is_pre_signin); 208 image_side_pixels, is_pre_signin);
200 retriever->Start(); 209 retriever->Start();
201 } 210 }
202 211
203 // static 212 // static
204 bool RegisterProfileDownloader(JNIEnv* env) { 213 bool RegisterProfileDownloader(JNIEnv* env) {
205 return RegisterNativesImpl(env); 214 return RegisterNativesImpl(env);
206 } 215 }
OLDNEW
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698