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

Side by Side Diff: chrome/browser/resources/options/import_data_overlay.js

Issue 10827141: Move handling of dialog preferences to Preferences class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed PrefCheckbox. Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/font_settings.js ('k') | chrome/browser/resources/options/language_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698