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

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

Issue 1743263002: [Smart Lock, UI] Auto sign-in first run dialog should use new strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | 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 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 27 matching lines...) Expand all
38 Profile* profile = 38 Profile* profile =
39 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 39 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
40 40
41 bool is_smartlock_branding_enabled = 41 bool is_smartlock_branding_enabled =
42 password_bubble_experiment::IsSmartLockUser( 42 password_bubble_experiment::IsSmartLockUser(
43 ProfileSyncServiceFactory::GetForProfile(profile)); 43 ProfileSyncServiceFactory::GetForProfile(profile));
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_MANAGE_PASSWORDS_AUTO_SIGNIN_SMART_LOCK_WELCOME, 48 IDS_AUTO_SIGNIN_FIRST_RUN_SMART_LOCK_TEXT,
49 IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_DEFAULT_WELCOME, &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 IsSyncingSettings(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 =
(...skipping 27 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698