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

Side by Side Diff: chrome/browser/password_manager/auto_signin_first_run_dialog_android.cc

Issue 1747003003: [Smart Lock, UI] Use correct string for the auto sign-in first run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « no previous file | chrome/browser/ui/passwords/manage_passwords_view_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/password_manager/auto_signin_first_run_dialog_android.h " 5 #include "chrome/browser/password_manager/auto_signin_first_run_dialog_android.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/password_manager/chrome_password_manager_client.h" 9 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 base::string16 explanation; 44 base::string16 explanation;
45 gfx::Range explanation_link_range = gfx::Range(); 45 gfx::Range explanation_link_range = gfx::Range();
46 GetBrandedTextAndLinkRange( 46 GetBrandedTextAndLinkRange(
47 is_smartlock_branding_enabled, 47 is_smartlock_branding_enabled,
48 IDS_AUTO_SIGNIN_FIRST_RUN_SMART_LOCK_TEXT, 48 IDS_AUTO_SIGNIN_FIRST_RUN_SMART_LOCK_TEXT,
49 IDS_AUTO_SIGNIN_FIRST_RUN_TEXT, &explanation, 49 IDS_AUTO_SIGNIN_FIRST_RUN_TEXT, &explanation,
50 &explanation_link_range); 50 &explanation_link_range);
51 gfx::NativeWindow native_window = web_contents_->GetTopLevelNativeWindow(); 51 gfx::NativeWindow native_window = web_contents_->GetTopLevelNativeWindow();
52 base::android::ScopedJavaGlobalRef<jobject> java_dialog_global; 52 base::android::ScopedJavaGlobalRef<jobject> java_dialog_global;
53 base::string16 message = l10n_util::GetStringUTF16( 53 base::string16 message = l10n_util::GetStringUTF16(
54 IsSyncingSettings(profile) 54 IsSyncingAutosignSetting(profile)
55 ? IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_MANY_DEVICES 55 ? IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_MANY_DEVICES
56 : IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_LOCAL_DEVICE); 56 : IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_LOCAL_DEVICE);
57 base::string16 ok_button_text = 57 base::string16 ok_button_text =
58 l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_OK); 58 l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_OK);
59 base::string16 turn_off_button_text = 59 base::string16 turn_off_button_text =
60 l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_TURN_OFF); 60 l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_TURN_OFF);
61 61
62 Java_AutoSigninFirstRunDialog_createDialog( 62 Java_AutoSigninFirstRunDialog_createDialog(
63 env, native_window->GetJavaObject().obj(), 63 env, native_window->GetJavaObject().obj(),
64 reinterpret_cast<intptr_t>(this), 64 reinterpret_cast<intptr_t>(this),
(...skipping 22 matching lines...) Expand all
87 void AutoSigninFirstRunDialogAndroid::OnLinkClicked(JNIEnv* env, jobject obj) { 87 void AutoSigninFirstRunDialogAndroid::OnLinkClicked(JNIEnv* env, jobject obj) {
88 web_contents_->OpenURL(content::OpenURLParams( 88 web_contents_->OpenURL(content::OpenURLParams(
89 GURL(password_manager::kPasswordManagerHelpCenterSmartLock), 89 GURL(password_manager::kPasswordManagerHelpCenterSmartLock),
90 content::Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, 90 content::Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
91 false /* is_renderer_initiated */)); 91 false /* is_renderer_initiated */));
92 } 92 }
93 93
94 bool RegisterAutoSigninFirstRunDialogAndroid(JNIEnv* env) { 94 bool RegisterAutoSigninFirstRunDialogAndroid(JNIEnv* env) {
95 return RegisterNativesImpl(env); 95 return RegisterNativesImpl(env);
96 } 96 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_view_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698