OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 OptionsPage = options.OptionsPage; | 6 const 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 var datatypeSelect = document.getElementById('sync-select-datatypes'); | 390 var datatypeSelect = document.getElementById('sync-select-datatypes'); |
391 var self = this; | 391 var self = this; |
392 datatypeSelect.onchange = function() { | 392 datatypeSelect.onchange = function() { |
393 var syncAll = this.selectedIndex == 0; | 393 var syncAll = this.selectedIndex == 0; |
394 self.setCheckboxesToKeepEverythingSynced_(syncAll); | 394 self.setCheckboxesToKeepEverythingSynced_(syncAll); |
395 }; | 395 }; |
396 | 396 |
397 $('sync-setup-configure').classList.remove('hidden'); | 397 $('sync-setup-configure').classList.remove('hidden'); |
398 | 398 |
399 if (args) { | 399 if (args) { |
| 400 if (!args['encryptionEnabled']) |
| 401 $('customize-sync-encryption').classList.add('hidden'); |
400 this.setCheckboxesAndErrors_(args); | 402 this.setCheckboxesAndErrors_(args); |
401 | 403 |
402 // Whether to display the 'Sync everything' confirmation page or the | 404 // Whether to display the 'Sync everything' confirmation page or the |
403 // customize data types page. | 405 // customize data types page. |
404 var showSyncEverythingPage = args['showSyncEverythingPage']; | 406 var showSyncEverythingPage = args['showSyncEverythingPage']; |
405 var keepEverythingSynced = args['keepEverythingSynced']; | 407 var keepEverythingSynced = args['keepEverythingSynced']; |
406 this.usePassphrase_ = args['usePassphrase']; | 408 this.usePassphrase_ = args['usePassphrase']; |
407 if (showSyncEverythingPage == false || | 409 if (showSyncEverythingPage == false || |
408 keepEverythingSynced == false || this.usePassphrase_) { | 410 keepEverythingSynced == false || this.usePassphrase_) { |
409 this.showCustomizePage_(keepEverythingSynced); | 411 this.showCustomizePage_(keepEverythingSynced); |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 | 701 |
700 SyncSetupOverlay.showSuccessAndSettingUp = function() { | 702 SyncSetupOverlay.showSuccessAndSettingUp = function() { |
701 SyncSetupOverlay.getInstance().showSuccessAndSettingUp_(); | 703 SyncSetupOverlay.getInstance().showSuccessAndSettingUp_(); |
702 }; | 704 }; |
703 | 705 |
704 // Export | 706 // Export |
705 return { | 707 return { |
706 SyncSetupOverlay: SyncSetupOverlay | 708 SyncSetupOverlay: SyncSetupOverlay |
707 }; | 709 }; |
708 }); | 710 }); |
OLD | NEW |