| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 * from |entries|. | 178 * from |entries|. |
| 179 * @param {Array} entries The list of password exception data. | 179 * @param {Array} entries The list of password exception data. |
| 180 */ | 180 */ |
| 181 setPasswordExceptionsList_: function(entries) { | 181 setPasswordExceptionsList_: function(entries) { |
| 182 this.passwordExceptionsList_.dataModel = new ArrayDataModel(entries); | 182 this.passwordExceptionsList_.dataModel = new ArrayDataModel(entries); |
| 183 this.updateListVisibility_(this.passwordExceptionsList_); | 183 this.updateListVisibility_(this.passwordExceptionsList_); |
| 184 }, | 184 }, |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 /** | 187 /** |
| 188 * Call to remove a saved password. | 188 * Removes a saved password. |
| 189 * @param rowIndex indicating the row to remove. | 189 * @param {number} rowIndex indicating the row to remove. |
| 190 */ | 190 */ |
| 191 PasswordManager.removeSavedPassword = function(rowIndex) { | 191 PasswordManager.removeSavedPassword = function(rowIndex) { |
| 192 chrome.send('removeSavedPassword', [String(rowIndex)]); | 192 chrome.send('removeSavedPassword', [String(rowIndex)]); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 /** | 195 /** |
| 196 * Call to remove a password exception. | 196 * Removes a password exception. |
| 197 * @param rowIndex indicating the row to remove. | 197 * @param {number} rowIndex indicating the row to remove. |
| 198 */ | 198 */ |
| 199 PasswordManager.removePasswordException = function(rowIndex) { | 199 PasswordManager.removePasswordException = function(rowIndex) { |
| 200 chrome.send('removePasswordException', [String(rowIndex)]); | 200 chrome.send('removePasswordException', [String(rowIndex)]); |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 /** | 203 /** |
| 204 * Call to remove all saved passwords. | 204 * Removes all saved passwords. |
| 205 * @param tab contentType of the tab currently on. | |
| 206 */ | 205 */ |
| 207 PasswordManager.removeAllPasswords = function() { | 206 PasswordManager.removeAllPasswords = function() { |
| 208 chrome.send('removeAllSavedPasswords'); | 207 chrome.send('removeAllSavedPasswords'); |
| 209 }; | 208 }; |
| 210 | 209 |
| 211 /** | 210 /** |
| 212 * Call to remove all saved passwords. | 211 * Removes all password exceptions. |
| 213 * @param tab contentType of the tab currently on. | |
| 214 */ | 212 */ |
| 215 PasswordManager.removeAllPasswordExceptions = function() { | 213 PasswordManager.removeAllPasswordExceptions = function() { |
| 216 chrome.send('removeAllPasswordExceptions'); | 214 chrome.send('removeAllPasswordExceptions'); |
| 217 }; | 215 }; |
| 218 | 216 |
| 219 PasswordManager.setSavedPasswordsList = function(entries) { | 217 PasswordManager.setSavedPasswordsList = function(entries) { |
| 220 PasswordManager.getInstance().setSavedPasswordsList_(entries); | 218 PasswordManager.getInstance().setSavedPasswordsList_(entries); |
| 221 }; | 219 }; |
| 222 | 220 |
| 223 PasswordManager.setPasswordExceptionsList = function(entries) { | 221 PasswordManager.setPasswordExceptionsList = function(entries) { |
| 224 PasswordManager.getInstance().setPasswordExceptionsList_(entries); | 222 PasswordManager.getInstance().setPasswordExceptionsList_(entries); |
| 225 }; | 223 }; |
| 226 | 224 |
| 227 // Export | 225 // Export |
| 228 return { | 226 return { |
| 229 PasswordManager: PasswordManager | 227 PasswordManager: PasswordManager |
| 230 }; | 228 }; |
| 231 | 229 |
| 232 }); | 230 }); |
| OLD | NEW |