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

Side by Side Diff: chrome/browser/resources/settings/people_page/import_data_dialog.js

Issue 2946563002: Run clang-format on .js files in c/b/r/settings (Closed)
Patch Set: dschuyler@ review Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 'settings-import-data-dialog' is a component for importing 6 * @fileoverview 'settings-import-data-dialog' is a component for importing
7 * bookmarks and other data from other sources. 7 * bookmarks and other data from other sources.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-import-data-dialog', 10 is: 'settings-import-data-dialog',
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // The last entry in |browserProfiles_| always refers to dummy profile for 103 // The last entry in |browserProfiles_| always refers to dummy profile for
104 // importing from a bookmarks file. 104 // importing from a bookmarks file.
105 return this.selected_.index == this.browserProfiles_.length - 1; 105 return this.selected_.index == this.browserProfiles_.length - 1;
106 }, 106 },
107 107
108 /** 108 /**
109 * @return {string} 109 * @return {string}
110 * @private 110 * @private
111 */ 111 */
112 getActionButtonText_: function() { 112 getActionButtonText_: function() {
113 return this.i18n(this.isImportFromFileSelected_() ? 113 return this.i18n(
114 'importChooseFile' : 'importCommit'); 114 this.isImportFromFileSelected_() ? 'importChooseFile' : 'importCommit');
115 }, 115 },
116 116
117 /** @private */ 117 /** @private */
118 onBrowserProfileSelectionChange_: function() { 118 onBrowserProfileSelectionChange_: function() {
119 this.selected_ = this.browserProfiles_[this.$.browserSelect.selectedIndex]; 119 this.selected_ = this.browserProfiles_[this.$.browserSelect.selectedIndex];
120 }, 120 },
121 121
122 /** @private */ 122 /** @private */
123 onActionButtonTap_: function() { 123 onActionButtonTap_: function() {
124 if (this.isImportFromFileSelected_()) 124 if (this.isImportFromFileSelected_())
125 this.browserProxy_.importFromBookmarksFile(); 125 this.browserProxy_.importFromBookmarksFile();
126 else 126 else
127 this.browserProxy_.importData(this.$.browserSelect.selectedIndex); 127 this.browserProxy_.importData(this.$.browserSelect.selectedIndex);
128 }, 128 },
129 129
130 /** @private */ 130 /** @private */
131 closeDialog_: function() { 131 closeDialog_: function() {
132 this.$.dialog.close(); 132 this.$.dialog.close();
133 }, 133 },
134 134
135 /** 135 /**
136 * @return {boolean} Whether the import button should be disabled. 136 * @return {boolean} Whether the import button should be disabled.
137 * @private 137 * @private
138 */ 138 */
139 shouldDisableImport_: function() { 139 shouldDisableImport_: function() {
140 return this.hasImportStatus_(settings.ImportDataStatus.IN_PROGRESS) || 140 return this.hasImportStatus_(settings.ImportDataStatus.IN_PROGRESS) ||
141 this.noImportDataTypeSelected_; 141 this.noImportDataTypeSelected_;
142 }, 142 },
143 }); 143 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698