diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-28 00:28:03 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-28 00:28:03 +0000 |
commit | 8fee844e924295356c75ac88d20dd8e48638da3a (patch) | |
tree | cd6c3f572db961e7358ae4c38cebb607d7aa4c01 /chrome/browser/resources/options/autofill_options.js | |
parent | f1cac0efc19086ef04f25b91b6c525da8e96f9f2 (diff) | |
download | chromium_src-8fee844e924295356c75ac88d20dd8e48638da3a.zip chromium_src-8fee844e924295356c75ac88d20dd8e48638da3a.tar.gz chromium_src-8fee844e924295356c75ac88d20dd8e48638da3a.tar.bz2 |
Autofill deprecate unique_ids in favor of guids for DOMUI
Removes use of labels and unique_ids in the Autofill options handler in DOMUI.
BUG=58813
TEST=Manual tests with DOMUI: Add, Update, and Delete both addresses and credit cards.
Review URL: http://codereview.chromium.org/4145008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/options/autofill_options.js')
-rw-r--r-- | chrome/browser/resources/options/autofill_options.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/resources/options/autofill_options.js b/chrome/browser/resources/options/autofill_options.js index 4ee8122..3b662f2 100644 --- a/chrome/browser/resources/options/autofill_options.js +++ b/chrome/browser/resources/options/autofill_options.js @@ -23,8 +23,8 @@ cr.define('options', function() { this.numAddresses = 0; this.numCreditCards = 0; this.activeNavTab = null; - this.addressIDs = null; - this.creditCardIDs = null; + this.addressGUIDs = null; + this.creditCardGUIDs = null; OptionsPage.call(this, 'autoFillOptions', templateData.autoFillOptionsTitle, 'autoFillOptionsPage'); @@ -150,11 +150,11 @@ cr.define('options', function() { var profileList = $('profileList'); var blankAddress = profileList.options[addressOffset]; this.numAddresses = addresses.length; - this.addressIDs = new Array(this.numAddresses); + this.addressGUIDs = new Array(this.numAddresses); for (var i = 0; i < this.numAddresses; i++) { var address = addresses[i]; var option = new Option(address['label']); - this.addressIDs[i] = address['uniqueID']; + this.addressGUIDs[i] = address['guid']; profileList.add(option, blankAddress); } @@ -170,11 +170,11 @@ cr.define('options', function() { this.resetCreditCards_(); var profileList = $('profileList'); this.numCreditCards = creditCards.length; - this.creditCardIDs = new Array(this.numCreditCards); + this.creditCardGUIDs = new Array(this.numCreditCards); for (var i = 0; i < this.numCreditCards; i++) { var creditCard = creditCards[i]; var option = new Option(creditCard['label']); - this.creditCardIDs[i] = creditCard['uniqueID']; + this.creditCardGUIDs[i] = creditCard['guid']; profileList.add(option, null); } @@ -205,10 +205,9 @@ cr.define('options', function() { editProfile_: function() { var idx = $('profileList').selectedIndex; if ((profileIndex = this.getAddressIndex_(idx)) != -1) { - chrome.send('editAddress', [String(this.addressIDs[profileIndex])]); + chrome.send('editAddress', [this.addressGUIDs[profileIndex]]); } else if ((profileIndex = this.getCreditCardIndex_(idx)) != -1) { - chrome.send('editCreditCard', - [String(this.creditCardIDs[profileIndex])]); + chrome.send('editCreditCard', [this.creditCardGUIDs[profileIndex]]); } }, @@ -220,10 +219,9 @@ cr.define('options', function() { removeProfile_: function() { var idx = $('profileList').selectedIndex; if ((profileIndex = this.getAddressIndex_(idx)) != -1) - chrome.send('removeAddress', [String(this.addressIDs[profileIndex])]); + chrome.send('removeAddress', [this.addressGUIDs[profileIndex]]); else if ((profileIndex = this.getCreditCardIndex_(idx)) != -1) - chrome.send('removeCreditCard', - [String(this.creditCardIDs[profileIndex])]); + chrome.send('removeCreditCard', [this.creditCardGUIDs[profileIndex]]); }, /** |