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

Side by Side Diff: chrome/browser/sync/profile_sync_service_android.cc

Issue 2393643004: [MD Settings][People] Updates positions of username and sync status message (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync/profile_sync_service_android.h" 5 #include "chrome/browser/sync/profile_sync_service_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 return base::android::ConvertUTF16ToJavaString(env, 434 return base::android::ConvertUTF16ToJavaString(env,
435 l10n_util::GetStringFUTF16(IDS_SYNC_ENTER_PASSPHRASE_BODY_WITH_DATE, 435 l10n_util::GetStringFUTF16(IDS_SYNC_ENTER_PASSPHRASE_BODY_WITH_DATE,
436 passphrase_time_str)); 436 passphrase_time_str));
437 } 437 }
438 438
439 ScopedJavaLocalRef<jstring> 439 ScopedJavaLocalRef<jstring>
440 ProfileSyncServiceAndroid::GetCurrentSignedInAccountText( 440 ProfileSyncServiceAndroid::GetCurrentSignedInAccountText(
441 JNIEnv* env, 441 JNIEnv* env,
442 const JavaParamRef<jobject>&) { 442 const JavaParamRef<jobject>&) {
443 DCHECK_CURRENTLY_ON(BrowserThread::UI); 443 DCHECK_CURRENTLY_ON(BrowserThread::UI);
444 const std::string& sync_username =
445 SigninManagerFactory::GetForProfile(profile_)
446 ->GetAuthenticatedAccountInfo()
447 .email;
448 return base::android::ConvertUTF16ToJavaString(env, 444 return base::android::ConvertUTF16ToJavaString(env,
449 l10n_util::GetStringFUTF16( 445 l10n_util::GetStringUTF16(IDS_SYNC_ACCOUNT_SYNCING));
maxbogue 2016/10/05 15:56:23 I believe that since this no longer needs to inser
Moe 2016/10/05 18:52:45 I don't have the setup to build and test android.
450 IDS_SYNC_ACCOUNT_SYNCING_TO_USER,
451 base::ASCIIToUTF16(sync_username)));
452 } 446 }
453 447
454 ScopedJavaLocalRef<jstring> 448 ScopedJavaLocalRef<jstring>
455 ProfileSyncServiceAndroid::GetSyncEnterCustomPassphraseBodyText( 449 ProfileSyncServiceAndroid::GetSyncEnterCustomPassphraseBodyText(
456 JNIEnv* env, 450 JNIEnv* env,
457 const JavaParamRef<jobject>&) { 451 const JavaParamRef<jobject>&) {
458 DCHECK_CURRENTLY_ON(BrowserThread::UI); 452 DCHECK_CURRENTLY_ON(BrowserThread::UI);
459 return ConvertUTF8ToJavaString( 453 return ConvertUTF8ToJavaString(
460 env, l10n_util::GetStringUTF8(IDS_SYNC_ENTER_PASSPHRASE_BODY)); 454 env, l10n_util::GetStringUTF8(IDS_SYNC_ENTER_PASSPHRASE_BODY));
461 } 455 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 506 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
513 ProfileSyncServiceAndroid* profile_sync_service_android = 507 ProfileSyncServiceAndroid* profile_sync_service_android =
514 new ProfileSyncServiceAndroid(env, obj); 508 new ProfileSyncServiceAndroid(env, obj);
515 if (profile_sync_service_android->Init()) { 509 if (profile_sync_service_android->Init()) {
516 return reinterpret_cast<intptr_t>(profile_sync_service_android); 510 return reinterpret_cast<intptr_t>(profile_sync_service_android);
517 } else { 511 } else {
518 delete profile_sync_service_android; 512 delete profile_sync_service_android;
519 return 0; 513 return 0;
520 } 514 }
521 } 515 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698