Commit 123b175f authored by engedy's avatar engedy Committed by Commit bot

[Smart Lock] Update strings for Save Passwords page on Android.

BUG=486739

Review URL: https://codereview.chromium.org/1135333006

Cr-Commit-Position: refs/heads/master@{#330251}
parent 25d1cd1f
......@@ -146,6 +146,10 @@ public final class PasswordUIView {
return nativeShouldDisplayManageAccountLink();
}
public static boolean shouldUseSmartLockBranding() {
return nativeShouldUseSmartLockBranding();
}
/**
* Destroy the native object.
*/
......@@ -180,6 +184,8 @@ public final class PasswordUIView {
private static native boolean nativeShouldDisplayManageAccountLink();
private static native boolean nativeShouldUseSmartLockBranding();
private native void nativeDestroy(long nativePasswordUIViewAndroid);
}
......@@ -76,7 +76,11 @@ public class ManageSavedPasswordsPreferences extends PreferenceFragment
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActivity().setTitle(R.string.prefs_saved_passwords);
if (PasswordUIView.shouldUseSmartLockBranding()) {
getActivity().setTitle(R.string.prefs_smart_lock_for_passwords);
} else {
getActivity().setTitle(R.string.prefs_saved_passwords);
}
setPreferenceScreen(getPreferenceManager().createPreferenceScreen(getActivity()));
mPasswordManagerHandler.addObserver(this);
......
......@@ -235,7 +235,10 @@
<message name="IDS_PREFS_SAVED_PASSWORDS" desc="Title for the Saved Passwords preferences. [CHAR-LIMIT=32]">
Save passwords
</message>
<message name="IDS_PASSWORDS_AUTO_SIGNIN_TITLE" desc="Title for checkbox to enable automatically signing the user in to websites">
<message name="IDS_PREFS_SMART_LOCK_FOR_PASSWORDS" desc="The brand name of the password manager to be displayed in preferences instead of the title 'Save Passwords' when a user is signed in. [CHAR-LIMIT=32]">
Smart Lock for Passwords
</message>
<message name="IDS_PASSWORDS_AUTO_SIGNIN_TITLE" desc="Title for checkbox to enable automatically signing the user in to websites">
Auto Sign-in
</message>
<message name="IDS_PASSWORDS_AUTO_SIGNIN_DESCRIPTION" desc="Text under 'Auto sign-in' checkbox">
......
......@@ -11,6 +11,7 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
#include "chrome/browser/ui/passwords/password_bubble_experiment.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/core/common/password_form.h"
......@@ -114,6 +115,12 @@ static jboolean ShouldDisplayManageAccountLink(
return password_manager::ManageAccountLinkExperimentEnabled();
}
static jboolean ShouldUseSmartLockBranding(
JNIEnv* env, jclass) {
return password_bubble_experiment::IsSmartLockBrandingEnabled(
ProfileManager::GetLastUsedProfile());
}
// static
static jlong Init(JNIEnv* env, jobject obj) {
PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment