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

Side by Side Diff: chrome/browser/resources/options/password_manager.js

Issue 6770012: Handle the PasswordManagerAllowShowPasswords preference in the options webui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep password column, show "IT-admin" banner Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 cr.define('options', function() { 5 cr.define('options', function() {
6 const OptionsPage = options.OptionsPage; 6 const OptionsPage = options.OptionsPage;
7 const ArrayDataModel = cr.ui.ArrayDataModel; 7 const ArrayDataModel = cr.ui.ArrayDataModel;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // PasswordManager class: 10 // PasswordManager class:
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 var listPlaceHolderID = list.id + '-empty-placeholder'; 90 var listPlaceHolderID = list.id + '-empty-placeholder';
91 list.hidden = empty; 91 list.hidden = empty;
92 $(listPlaceHolderID).hidden = !empty; 92 $(listPlaceHolderID).hidden = !empty;
93 }, 93 },
94 94
95 /** 95 /**
96 * Updates the data model for the saved passwords list with the values from 96 * Updates the data model for the saved passwords list with the values from
97 * |entries|. 97 * |entries|.
98 * @param {Array} entries The list of saved password data. 98 * @param {Array} entries The list of saved password data.
99 */ 99 */
100 setSavedPasswordsList_: function(entries) { 100 setSavedPasswordsList_: function(entries, showPasswords) {
101 this.savedPasswordsList_.showPasswords = showPasswords;
101 this.savedPasswordsList_.dataModel = new ArrayDataModel(entries); 102 this.savedPasswordsList_.dataModel = new ArrayDataModel(entries);
102 this.updateListVisibility_(this.savedPasswordsList_); 103 this.updateListVisibility_(this.savedPasswordsList_);
103 }, 104 },
104 105
105 /** 106 /**
106 * Updates the data model for the password exceptions list with the values 107 * Updates the data model for the password exceptions list with the values
107 * from |entries|. 108 * from |entries|.
108 * @param {Array} entries The list of password exception data. 109 * @param {Array} entries The list of password exception data.
109 */ 110 */
110 setPasswordExceptionsList_: function(entries) { 111 setPasswordExceptionsList_: function(entries) {
(...skipping 27 matching lines...) Expand all
138 }; 139 };
139 140
140 /** 141 /**
141 * Call to remove all saved passwords. 142 * Call to remove all saved passwords.
142 * @param tab contentType of the tab currently on. 143 * @param tab contentType of the tab currently on.
143 */ 144 */
144 PasswordManager.removeAllPasswordExceptions = function() { 145 PasswordManager.removeAllPasswordExceptions = function() {
145 chrome.send('removeAllPasswordExceptions'); 146 chrome.send('removeAllPasswordExceptions');
146 }; 147 };
147 148
148 PasswordManager.setSavedPasswordsList = function(entries) { 149 PasswordManager.setSavedPasswordsList = function(entries, showPasswords) {
149 PasswordManager.getInstance().setSavedPasswordsList_(entries); 150 PasswordManager.getInstance().setSavedPasswordsList_(entries,
151 showPasswords);
150 }; 152 };
151 153
152 PasswordManager.setPasswordExceptionsList = function(entries) { 154 PasswordManager.setPasswordExceptionsList = function(entries) {
153 PasswordManager.getInstance().setPasswordExceptionsList_(entries); 155 PasswordManager.getInstance().setPasswordExceptionsList_(entries);
154 }; 156 };
155 157
156 // Export 158 // Export
157 return { 159 return {
158 PasswordManager: PasswordManager 160 PasswordManager: PasswordManager
159 }; 161 };
160 162
161 }); 163 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698