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

Side by Side Diff: chrome/browser/ui/android/snackbars/auto_signin_snackbar_controller.cc

Issue 1326813002: [Smart Lock] Remove unnecessary string duplication for autosign in smart lock UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Multyline snackbar Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/android/snackbars/auto_signin_snackbar_controller.h" 5 #include "chrome/browser/ui/android/snackbars/auto_signin_snackbar_controller.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "chrome/browser/android/tab_android.h" 9 #include "chrome/browser/android/tab_android.h"
10 #include "chrome/grit/generated_resources.h"
10 #include "jni/AutoSigninSnackbarController_jni.h" 11 #include "jni/AutoSigninSnackbarController_jni.h"
12 #include "ui/base/l10n/l10n_util.h"
11 13
12 void ShowAutoSigninSnackbar(TabAndroid *tab, const base::string16& username) { 14 void ShowAutoSigninSnackbar(TabAndroid *tab, const base::string16& username) {
13 JNIEnv *env = base::android::AttachCurrentThread(); 15 JNIEnv *env = base::android::AttachCurrentThread();
14 ScopedJavaLocalRef<jstring> message = 16 ScopedJavaLocalRef<jstring> message = base::android::ConvertUTF16ToJavaString(
15 base::android::ConvertUTF16ToJavaString( 17 env, l10n_util::GetStringFUTF16(IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE,
16 env, username); 18 username));
17 Java_AutoSigninSnackbarController_showSnackbar( 19 Java_AutoSigninSnackbarController_showSnackbar(
18 env, tab->GetJavaObject().obj(), message.obj()); 20 env, tab->GetJavaObject().obj(), message.obj());
19 } 21 }
20 22
21 bool RegisterAutoSigninSnackbarController(JNIEnv *env) { 23 bool RegisterAutoSigninSnackbarController(JNIEnv *env) {
22 return RegisterNativesImpl(env); 24 return RegisterNativesImpl(env);
23 } 25 }
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