OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 | 7 |
8 /** | 8 /** |
9 * ImportDataOverlay class | 9 * ImportDataOverlay class |
10 * Encapsulated handling of the 'Import Data' overlay page. | 10 * Encapsulated handling of the 'Import Data' overlay page. |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 * checkbox goes back to the default "checked" state (or alternatively, to | 157 * checkbox goes back to the default "checked" state (or alternatively, to |
158 * the state set by a recommended policy). | 158 * the state set by a recommended policy). |
159 * @private | 159 * @private |
160 */ | 160 */ |
161 clearUserPrefs_: function() { | 161 clearUserPrefs_: function() { |
162 var importPrefs = ['import_history', | 162 var importPrefs = ['import_history', |
163 'import_bookmarks', | 163 'import_bookmarks', |
164 'import_saved_passwords', | 164 'import_saved_passwords', |
165 'import_search_engine']; | 165 'import_search_engine']; |
166 for (var i = 0; i < importPrefs.length; i++) | 166 for (var i = 0; i < importPrefs.length; i++) |
167 Preferences.clearPref(importPrefs[i], undefined); | 167 Preferences.clearPref(importPrefs[i], true); |
168 }, | 168 }, |
169 | 169 |
170 /** | 170 /** |
171 * Update the dialog layout to reflect success state. | 171 * Update the dialog layout to reflect success state. |
172 * @param {boolean} success If true, show success dialog elements. | 172 * @param {boolean} success If true, show success dialog elements. |
173 * @private | 173 * @private |
174 */ | 174 */ |
175 updateSuccessState_: function(success) { | 175 updateSuccessState_: function(success) { |
176 var sections = document.querySelectorAll('.import-data-configure'); | 176 var sections = document.querySelectorAll('.import-data-configure'); |
177 for (var i = 0; i < sections.length; i++) | 177 for (var i = 0; i < sections.length; i++) |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 ImportDataOverlay.getInstance().updateSuccessState_(false); | 238 ImportDataOverlay.getInstance().updateSuccessState_(false); |
239 | 239 |
240 OptionsPage.navigateToPage('importData'); | 240 OptionsPage.navigateToPage('importData'); |
241 }; | 241 }; |
242 | 242 |
243 // Export | 243 // Export |
244 return { | 244 return { |
245 ImportDataOverlay: ImportDataOverlay | 245 ImportDataOverlay: ImportDataOverlay |
246 }; | 246 }; |
247 }); | 247 }); |
OLD | NEW |