| Index: chrome/browser/resources/settings/people_page/import_data_dialog.js
|
| diff --git a/chrome/browser/resources/settings/people_page/import_data_dialog.js b/chrome/browser/resources/settings/people_page/import_data_dialog.js
|
| index a63b30832a1f07de064042c502f2b0934e2f7b10..6e0f1c2c0004de8d222fe9ec01188f69b0b09fe7 100644
|
| --- a/chrome/browser/resources/settings/people_page/import_data_dialog.js
|
| +++ b/chrome/browser/resources/settings/people_page/import_data_dialog.js
|
| @@ -9,7 +9,7 @@
|
| Polymer({
|
| is: 'settings-import-data-dialog',
|
|
|
| - behaviors: [I18nBehavior, WebUIListenerBehavior],
|
| + behaviors: [I18nBehavior, WebUIListenerBehavior, PrefsBehavior],
|
|
|
| properties: {
|
| /** @private {!Array<!settings.BrowserProfile>} */
|
| @@ -41,10 +41,11 @@
|
| type: Object,
|
| value: settings.ImportDataStatus,
|
| },
|
| + },
|
|
|
| - /** @private */
|
| - showBookmarkSuccess_: Boolean,
|
| - },
|
| + observers: [
|
| + 'prefsChanged_(selected_, prefs.*)',
|
| + ],
|
|
|
| /** @private {?settings.ImportDataBrowserProxy} */
|
| browserProxy_: null,
|
| @@ -68,24 +69,22 @@
|
| /** @param {settings.ImportDataStatus} importStatus */
|
| function(importStatus) {
|
| this.importStatus_ = importStatus;
|
| - if (this.hasImportStatus_(settings.ImportDataStatus.SUCCEEDED)) {
|
| - this.showBookmarkSuccess_ =
|
| - this.$.favorites.checked && this.selected_.favorites;
|
| - }
|
| -
|
| if (this.hasImportStatus_(settings.ImportDataStatus.FAILED))
|
| this.closeDialog_();
|
| }.bind(this));
|
| },
|
|
|
| /** @private */
|
| - onCheckboxChange_: function() {
|
| + prefsChanged_: function() {
|
| this.noImportDataTypeSelected_ =
|
| - !(this.selected_.history && this.$.history.checked) &&
|
| - !(this.selected_.favorites && this.$.favorites.checked) &&
|
| - !(this.selected_.passwords && this.$.passwords.checked) &&
|
| - !(this.selected_.search && this.$.search.checked) &&
|
| - !(this.selected_.autofillFormData && this.$.autofillFormData.checked);
|
| + !(this.getPref('import_history').value && this.selected_.history) &&
|
| + !(this.getPref('import_bookmarks').value && this.selected_.favorites) &&
|
| + !(this.getPref('import_saved_passwords').value &&
|
| + this.selected_.passwords) &&
|
| + !(this.getPref('import_search_engine').value &&
|
| + this.selected_.search) &&
|
| + !(this.getPref('import_autofill_form_data').value &&
|
| + this.selected_.autofillFormData);
|
| },
|
|
|
| /**
|
| @@ -116,7 +115,6 @@
|
| /** @private */
|
| onBrowserProfileSelectionChange_: function() {
|
| this.selected_ = this.browserProfiles_[this.$.browserSelect.selectedIndex];
|
| - this.onCheckboxChange_();
|
| },
|
|
|
| /** @private */
|
|
|