Commit 671bc012 authored by hcarmona's avatar hcarmona Committed by Commit bot

Add checkbox to allow auto signing in with a saved password.

Screenshot attached to bug.

BUG=620002
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2237533002
Cr-Commit-Position: refs/heads/master@{#412614}
parent 3b17e107
......@@ -317,6 +317,12 @@
<message name="IDS_SETTINGS_PASSWORDS" desc="Name for the password section and toggle">
Manage passwords
</message>
<message name="IDS_SETTINGS_PASSWORDS_AUTOSIGNIN_CHECKBOX_LABEL" desc="Label for a checkbox that allows users to sign in automatically to websites when their credentials are already saved.">
Auto Sign-in
</message>
<message name="IDS_SETTINGS_PASSWORDS_AUTOSIGNIN_CHECKBOX_DESC" desc="Text that describes the 'Auto Sign-in' functionality to users.">
Automatically sign in to websites using stored credentials. When the feature is disabled, you will be asked for confirmation every time before signing in to a website.
</message>
<message name="IDS_SETTINGS_PASSWORDS_DETAIL" desc="Description of what toggling the 'Manage passwords' setting does. Immediately underneath IDS_SETTINGS_PASSWORDS">
Offer to save your web passwords
</message>
......
......@@ -115,6 +115,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelistedKeys() {
settings_private::PrefType::PREF_TYPE_NUMBER;
(*s_whitelist)["profile.password_manager_enabled"] =
settings_private::PrefType::PREF_TYPE_BOOLEAN;
(*s_whitelist)["credentials_enable_autosignin"] =
settings_private::PrefType::PREF_TYPE_BOOLEAN;
(*s_whitelist)["safebrowsing.enabled"] =
settings_private::PrefType::PREF_TYPE_BOOLEAN;
(*s_whitelist)["safebrowsing.extended_reporting_enabled"] =
......
......@@ -57,7 +57,7 @@
search-term="{{passwordFilter_}}">
<passwords-section saved-passwords="[[savedPasswords]]"
id="passwordSection" password-exceptions="[[passwordExceptions]]"
filter="[[passwordFilter_]]">
filter="[[passwordFilter_]]" prefs="{{prefs}}">
</passwords-section>
</settings-subpage>
</template>
......
......@@ -6,6 +6,7 @@
<link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared_menu.html">
<link rel="import" href="/passwords_and_forms_page/password_edit_dialog.html">
<link rel="import" href="/passwords_and_forms_page/passwords_shared_css.html">
<link rel="import" href="/prefs/prefs.html">
<link rel="import" href="/settings_shared_css.html">
<dom-module id="passwords-section">
......@@ -25,6 +26,10 @@
width: 0;
}
#autosigninCheckbox {
margin-bottom: 24px;
}
.website-column {
flex: 3;
}
......@@ -49,6 +54,11 @@
@apply(--settings-actionable);
}
</style>
<settings-checkbox id="autosigninCheckbox"
pref="{{prefs.credentials_enable_autosignin}}"
label="$i18n{passwordsAutosigninLabel}"
sub-label="$i18n{passwordsAutosigninDescription}">
</settings-checkbox>
<div id="manageLink">$i18nRaw{managePasswordsLabel}</div>
<div class="heading">$i18n{savedPasswordsHeading}</div>
<div class="item-list">
......
......@@ -21,6 +21,12 @@ Polymer({
is: 'passwords-section',
properties: {
/** Preferences state. */
prefs: {
type: Object,
notify: true,
},
/**
* An array of passwords to display.
* @type {!Array<!chrome.passwordsPrivate.PasswordUiEntry>}
......
......@@ -806,6 +806,10 @@ void AddPasswordsAndFormsStrings(content::WebUIDataSource* html_source) {
{"addCreditCardTitle", IDS_SETTINGS_ADD_CREDIT_CARD_TITLE},
{"autofillDetail", IDS_SETTINGS_AUTOFILL_DETAIL},
{"passwords", IDS_SETTINGS_PASSWORDS},
{"passwordsAutosigninLabel",
IDS_SETTINGS_PASSWORDS_AUTOSIGNIN_CHECKBOX_LABEL},
{"passwordsAutosigninDescription",
IDS_SETTINGS_PASSWORDS_AUTOSIGNIN_CHECKBOX_DESC},
{"passwordsDetail", IDS_SETTINGS_PASSWORDS_DETAIL},
{"savedPasswordsHeading", IDS_SETTINGS_PASSWORDS_SAVED_HEADING},
{"passwordExceptionsHeading", IDS_SETTINGS_PASSWORDS_EXCEPTIONS_HEADING},
......
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