summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/options
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources/options')
-rw-r--r--chrome/browser/resources/options/autofill_edit_address_overlay.js18
-rw-r--r--chrome/browser/resources/options/autofill_edit_creditcard_overlay.js14
-rw-r--r--chrome/browser/resources/options/autofill_options.js22
3 files changed, 26 insertions, 28 deletions
diff --git a/chrome/browser/resources/options/autofill_edit_address_overlay.js b/chrome/browser/resources/options/autofill_edit_address_overlay.js
index a6eb980..46a17d0 100644
--- a/chrome/browser/resources/options/autofill_edit_address_overlay.js
+++ b/chrome/browser/resources/options/autofill_edit_address_overlay.js
@@ -5,8 +5,8 @@
cr.define('options', function() {
const OptionsPage = options.OptionsPage;
- // The unique ID of the loaded address.
- var uniqueID;
+ // The GUID of the loaded address.
+ var guid;
/**
* AutoFillEditAddressOverlay class
@@ -39,19 +39,19 @@ cr.define('options', function() {
self.dismissOverlay_();
}
- self.uniqueID = 0;
+ self.guid = '';
self.clearInputFields_();
self.connectInputEvents_();
},
/**
- * Clears any uncommitted input, resets the stored unique ID and dismisses
- * the overlay.
+ * Clears any uncommitted input, resets the stored GUID and dismisses the
+ * overlay.
* @private
*/
dismissOverlay_: function() {
this.clearInputFields_();
- this.uniqueID = 0;
+ this.guid = '';
OptionsPage.clearOverlays();
},
@@ -62,7 +62,7 @@ cr.define('options', function() {
*/
saveAddress_: function() {
var address = new Array();
- address[0] = String(this.uniqueID);
+ address[0] = this.guid;
address[1] = $('fullName').value;
address[2] = $('companyName').value;
address[3] = $('addrLine1').value;
@@ -129,13 +129,13 @@ cr.define('options', function() {
/**
* Loads the address data from |address|, sets the input fields based on
- * this data and stores the unique ID of the address.
+ * this data and stores the GUID of the address.
* @private
*/
loadAddress_: function(address) {
this.setInputFields_(address);
this.inputFieldChanged_();
- this.uniqueID = address['uniqueID'];
+ this.guid = address['guid'];
},
/**
diff --git a/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js b/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js
index 0ee9e1a..01b1722 100644
--- a/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js
+++ b/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js
@@ -5,8 +5,8 @@
cr.define('options', function() {
const OptionsPage = options.OptionsPage;
- // The unique ID of the loaded credit card.
- var uniqueID;
+ // The GUID of the loaded credit card.
+ var guid;
/**
* AutoFillEditCreditCardOverlay class
@@ -39,7 +39,7 @@ cr.define('options', function() {
self.dismissOverlay_();
}
- self.uniqueID = 0;
+ self.guid = '';
self.clearInputFields_();
self.connectInputEvents_();
self.setDefaultSelectOptions_();
@@ -51,7 +51,7 @@ cr.define('options', function() {
*/
dismissOverlay_: function() {
this.clearInputFields_();
- this.uniqueID = 0;
+ this.guid = '';
OptionsPage.clearOverlays();
},
@@ -62,7 +62,7 @@ cr.define('options', function() {
*/
saveCreditCard_: function() {
var creditCard = new Array(5);
- creditCard[0] = String(this.uniqueID);
+ creditCard[0] = this.guid;
creditCard[1] = $('nameOnCard').value;
creditCard[2] = $('creditCardNumber').value;
creditCard[3] = $('expirationMonth').value;
@@ -174,13 +174,13 @@ cr.define('options', function() {
/**
* Loads the credit card data from |creditCard|, sets the input fields based
- * on this data and stores the unique ID of the credit card.
+ * on this data and stores the GUID of the credit card.
* @private
*/
loadCreditCard_: function(creditCard) {
this.setInputFields_(creditCard);
this.inputFieldChanged_();
- this.uniqueID = creditCard['uniqueID'];
+ this.guid = creditCard['guid'];
},
};
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]]);
},
/**