| Index: chrome/browser/resources/options/import_data_overlay.js
|
| diff --git a/chrome/browser/resources/options/import_data_overlay.js b/chrome/browser/resources/options/import_data_overlay.js
|
| index 2d9fd60dc8d269b6ded5c8e258223c8c1948dcb1..6198782d04ef493663c0c14057f58d03ab435c2a 100644
|
| --- a/chrome/browser/resources/options/import_data_overlay.js
|
| +++ b/chrome/browser/resources/options/import_data_overlay.js
|
| @@ -12,17 +12,16 @@ cr.define('options', function() {
|
| * @class
|
| */
|
| function ImportDataOverlay() {
|
| - Page.call(this,
|
| - 'importData',
|
| - loadTimeData.getString('importDataOverlayTabTitle'),
|
| - 'import-data-overlay');
|
| + Page.call(
|
| + this, 'importData', loadTimeData.getString('importDataOverlayTabTitle'),
|
| + 'import-data-overlay');
|
| }
|
|
|
| cr.addSingletonGetter(ImportDataOverlay);
|
|
|
| /**
|
| - * @param {string} type The type of data to import. Used in the element's ID.
|
| - */
|
| + * @param {string} type The type of data to import. Used in the element's ID.
|
| + */
|
| function importable(type) {
|
| var id = 'import-' + type;
|
| return $(id).checked && !$(id + '-with-label').hidden;
|
| @@ -54,12 +53,13 @@ cr.define('options', function() {
|
|
|
| $('import-data-commit').onclick = function() {
|
| chrome.send('importData', [
|
| - String($('import-browsers').selectedIndex),
|
| - String($('import-history').checked),
|
| - String($('import-favorites').checked),
|
| - String($('import-passwords').checked),
|
| - String($('import-search').checked),
|
| - String($('import-autofill-form-data').checked)]);
|
| + String($('import-browsers').selectedIndex),
|
| + String($('import-history').checked),
|
| + String($('import-favorites').checked),
|
| + String($('import-passwords').checked),
|
| + String($('import-search').checked),
|
| + String($('import-autofill-form-data').checked)
|
| + ]);
|
| };
|
|
|
| $('import-data-cancel').onclick = function() {
|
| @@ -83,10 +83,9 @@ cr.define('options', function() {
|
| * @private
|
| */
|
| validateCommitButton_: function() {
|
| - var somethingToImport =
|
| - importable('history') || importable('favorites') ||
|
| - importable('passwords') || importable('search') ||
|
| - importable('autofill-form-data');
|
| + var somethingToImport = importable('history') ||
|
| + importable('favorites') || importable('passwords') ||
|
| + importable('search') || importable('autofill-form-data');
|
| $('import-data-commit').disabled = !somethingToImport;
|
| $('import-choose-file').disabled = !$('import-favorites').checked;
|
| },
|
| @@ -128,11 +127,8 @@ cr.define('options', function() {
|
| var browserProfile;
|
| if (this.browserProfiles.length > index)
|
| browserProfile = this.browserProfiles[index];
|
| - var importOptions = ['history',
|
| - 'favorites',
|
| - 'passwords',
|
| - 'search',
|
| - 'autofill-form-data'];
|
| + var importOptions =
|
| + ['history', 'favorites', 'passwords', 'search', 'autofill-form-data'];
|
| for (var i = 0; i < importOptions.length; i++) {
|
| var id = 'import-' + importOptions[i];
|
| var enable = browserProfile && browserProfile[importOptions[i]];
|
| @@ -148,8 +144,8 @@ cr.define('options', function() {
|
| */
|
| updateSupportedBrowsers_: function(browsers) {
|
| this.browserProfiles = browsers;
|
| - var browserSelect = /** @type {HTMLSelectElement} */(
|
| - $('import-browsers'));
|
| + var browserSelect =
|
| + /** @type {HTMLSelectElement} */ ($('import-browsers'));
|
| browserSelect.remove(0); // Remove the 'Loading...' option.
|
| browserSelect.textContent = '';
|
| var browserCount = browsers.length;
|
| @@ -224,7 +220,7 @@ cr.define('options', function() {
|
| var checkboxes =
|
| document.querySelectorAll('#import-checkboxes input[type=checkbox]');
|
| for (var i = 0; i < checkboxes.length; i++)
|
| - checkboxes[i].setDisabled('Importing', importing);
|
| + checkboxes[i].setDisabled('Importing', importing);
|
| if (!importing)
|
| ImportDataOverlay.getInstance().updateCheckboxes_();
|
| $('import-browsers').disabled = importing;
|
| @@ -263,7 +259,5 @@ cr.define('options', function() {
|
| };
|
|
|
| // Export
|
| - return {
|
| - ImportDataOverlay: ImportDataOverlay
|
| - };
|
| + return {ImportDataOverlay: ImportDataOverlay};
|
| });
|
|
|