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

Unified Diff: chrome/browser/resources/options2/autofill_edit_address_overlay.js

Issue 10391044: retry 136193 - convert localStrings to loadTimeData for options page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options2/autofill_edit_address_overlay.js
diff --git a/chrome/browser/resources/options2/autofill_edit_address_overlay.js b/chrome/browser/resources/options2/autofill_edit_address_overlay.js
index 7c564250401458d8e836341f17840f0721d5f807..c52bf8a7da92cfcb7f19e964944426b197027d14 100644
--- a/chrome/browser/resources/options2/autofill_edit_address_overlay.js
+++ b/chrome/browser/resources/options2/autofill_edit_address_overlay.js
@@ -16,7 +16,7 @@ cr.define('options', function() {
*/
function AutofillEditAddressOverlay() {
OptionsPage.call(this, 'autofillEditAddress',
- templateData.autofillEditAddressTitle,
+ loadTimeData.getString('autofillEditAddressTitle'),
'autofill-edit-address-overlay');
}
@@ -209,11 +209,10 @@ cr.define('options', function() {
* @private
*/
countryChanged_: function() {
- var countryCode = $('country').value;
- if (!countryCode)
- countryCode = templateData.defaultCountryCode;
+ var countryCode = $('country').value ||
+ loadTimeData.getString('defaultCountryCode');
- var details = templateData.autofillCountryData[countryCode];
+ var details = loadTimeData.getValue('autofillCountryData')[countryCode];
var postal = $('postal-code-label');
postal.textContent = details['postalCodeLabel'];
$('state-label').textContent = details['stateLabel'];
@@ -227,8 +226,8 @@ cr.define('options', function() {
* @private
*/
populateCountryList_: function() {
- var countryData = templateData.autofillCountryData;
- var defaultCountryCode = templateData.defaultCountryCode;
+ var countryData = loadTimeData.getValue('autofillCountryData');
+ var defaultCountryCode = loadTimeData.getString('defaultCountryCode');
// Build an array of the country names and their corresponding country
// codes, so that we can sort and insert them in order.

Powered by Google App Engine
This is Rietveld 408576698