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

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

Issue 2727813002: Options/MD Settings: use new prefs to drive import data dialog (Closed)
Patch Set: pastarmovj@ review Created 3 years, 9 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 (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 Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * ImportDataOverlay class 10 * ImportDataOverlay class
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 }, 173 },
174 174
175 /** 175 /**
176 * Clear import prefs set when user checks/unchecks a checkbox so that each 176 * Clear import prefs set when user checks/unchecks a checkbox so that each
177 * checkbox goes back to the default "checked" state (or alternatively, to 177 * checkbox goes back to the default "checked" state (or alternatively, to
178 * the state set by a recommended policy). 178 * the state set by a recommended policy).
179 * @private 179 * @private
180 */ 180 */
181 clearUserPrefs_: function() { 181 clearUserPrefs_: function() {
182 var importPrefs = ['import_history', 182 var importPrefs = [
183 'import_bookmarks', 183 'import_dialog_history', 'import_dialog_bookmarks',
184 'import_saved_passwords', 184 'import_dialog_saved_passwords', 'import_dialog_search_engine',
185 'import_search_engine', 185 'import_dialog_autofill_form_data'
186 'import_autofill_form_data']; 186 ];
187 for (var i = 0; i < importPrefs.length; i++) 187 for (var i = 0; i < importPrefs.length; i++)
188 Preferences.clearPref(importPrefs[i], true); 188 Preferences.clearPref(importPrefs[i], true);
189 }, 189 },
190 190
191 /** 191 /**
192 * Update the dialog layout to reflect success state. 192 * Update the dialog layout to reflect success state.
193 * @param {boolean} success If true, show success dialog elements. 193 * @param {boolean} success If true, show success dialog elements.
194 * @private 194 * @private
195 */ 195 */
196 updateSuccessState_: function(success) { 196 updateSuccessState_: function(success) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 ImportDataOverlay.getInstance().validateCommitButton_(); 260 ImportDataOverlay.getInstance().validateCommitButton_();
261 261
262 PageManager.showPageByName('importData'); 262 PageManager.showPageByName('importData');
263 }; 263 };
264 264
265 // Export 265 // Export
266 return { 266 return {
267 ImportDataOverlay: ImportDataOverlay 267 ImportDataOverlay: ImportDataOverlay
268 }; 268 };
269 }); 269 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698