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 /** @const */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
7 | 7 |
8 // Variable to track if a captcha challenge was issued. If this gets set to | 8 // Variable to track if a captcha challenge was issued. If this gets set to |
9 // true, it stays that way until we are told about successful login from | 9 // true, it stays that way until we are told about successful login from |
10 // the browser. This means subsequent errors (like invalid password) are | 10 // the browser. This means subsequent errors (like invalid password) are |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 var result = JSON.stringify({ | 262 var result = JSON.stringify({ |
263 'syncAllDataTypes': syncAll, | 263 'syncAllDataTypes': syncAll, |
264 'bookmarksSynced': syncAll || $('bookmarks-checkbox').checked, | 264 'bookmarksSynced': syncAll || $('bookmarks-checkbox').checked, |
265 'preferencesSynced': syncAll || $('preferences-checkbox').checked, | 265 'preferencesSynced': syncAll || $('preferences-checkbox').checked, |
266 'themesSynced': syncAll || $('themes-checkbox').checked, | 266 'themesSynced': syncAll || $('themes-checkbox').checked, |
267 'passwordsSynced': syncAll || $('passwords-checkbox').checked, | 267 'passwordsSynced': syncAll || $('passwords-checkbox').checked, |
268 'autofillSynced': syncAll || $('autofill-checkbox').checked, | 268 'autofillSynced': syncAll || $('autofill-checkbox').checked, |
269 'extensionsSynced': syncAll || $('extensions-checkbox').checked, | 269 'extensionsSynced': syncAll || $('extensions-checkbox').checked, |
270 'typedUrlsSynced': syncAll || $('typed-urls-checkbox').checked, | 270 'typedUrlsSynced': syncAll || $('typed-urls-checkbox').checked, |
271 'appsSynced': syncAll || $('apps-checkbox').checked, | 271 'appsSynced': syncAll || $('apps-checkbox').checked, |
272 'sessionsSynced': syncAll || $('sessions-checkbox').checked, | 272 'tabsSynced': syncAll || $('tabs-checkbox').checked, |
273 'encryptAllData': encryptAllData, | 273 'encryptAllData': encryptAllData, |
274 'usePassphrase': usePassphrase, | 274 'usePassphrase': usePassphrase, |
275 'isGooglePassphrase': googlePassphrase, | 275 'isGooglePassphrase': googlePassphrase, |
276 'passphrase': customPassphrase | 276 'passphrase': customPassphrase |
277 }); | 277 }); |
278 chrome.send('SyncSetupConfigure', [result]); | 278 chrome.send('SyncSetupConfigure', [result]); |
279 }, | 279 }, |
280 | 280 |
281 /** | 281 /** |
282 * Sets the disabled property of all input elements within the 'Customize | 282 * Sets the disabled property of all input elements within the 'Customize |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 $('omnibox-item').hidden = false; | 363 $('omnibox-item').hidden = false; |
364 } else { | 364 } else { |
365 $('omnibox-item').hidden = true; | 365 $('omnibox-item').hidden = true; |
366 } | 366 } |
367 if (args.appsRegistered) { | 367 if (args.appsRegistered) { |
368 $('apps-checkbox').checked = args.appsSynced; | 368 $('apps-checkbox').checked = args.appsSynced; |
369 $('apps-item').hidden = false; | 369 $('apps-item').hidden = false; |
370 } else { | 370 } else { |
371 $('apps-item').hidden = true; | 371 $('apps-item').hidden = true; |
372 } | 372 } |
373 if (args.sessionsRegistered) { | 373 if (args.tabsRegistered) { |
374 $('sessions-checkbox').checked = args.sessionsSynced; | 374 $('tabs-checkbox').checked = args.tabsSynced; |
375 $('sessions-item').hidden = false; | 375 $('tabs-item').hidden = false; |
376 } else { | 376 } else { |
377 $('sessions-item').hidden = true; | 377 $('tabs-item').hidden = true; |
378 } | 378 } |
379 | 379 |
380 this.setCheckboxesToKeepEverythingSynced_(args.syncAllDataTypes); | 380 this.setCheckboxesToKeepEverythingSynced_(args.syncAllDataTypes); |
381 }, | 381 }, |
382 | 382 |
383 setEncryptionRadios_: function(args) { | 383 setEncryptionRadios_: function(args) { |
384 if (args.encryptAllData) { | 384 if (args.encryptAllData) { |
385 $('encrypt-all-option').checked = true; | 385 $('encrypt-all-option').checked = true; |
386 this.disableEncryptionRadioGroup_(); | 386 this.disableEncryptionRadioGroup_(); |
387 } else { | 387 } else { |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 | 1050 |
1051 SyncSetupOverlay.showStopSyncingUI = function() { | 1051 SyncSetupOverlay.showStopSyncingUI = function() { |
1052 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | 1052 SyncSetupOverlay.getInstance().showStopSyncingUI_(); |
1053 }; | 1053 }; |
1054 | 1054 |
1055 // Export | 1055 // Export |
1056 return { | 1056 return { |
1057 SyncSetupOverlay: SyncSetupOverlay | 1057 SyncSetupOverlay: SyncSetupOverlay |
1058 }; | 1058 }; |
1059 }); | 1059 }); |
OLD | NEW |