| 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 Page = cr.ui.pageManager.Page; | 6 /** @const */ var Page = cr.ui.pageManager.Page; |
| 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
| 8 | 8 |
| 9 // True if the synced account uses a custom passphrase. | 9 // True if the synced account uses a custom passphrase. |
| 10 var usePassphrase_ = false; | 10 var usePassphrase_ = false; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 cr.addSingletonGetter(SyncSetupOverlay); | 63 cr.addSingletonGetter(SyncSetupOverlay); |
| 64 | 64 |
| 65 SyncSetupOverlay.prototype = { | 65 SyncSetupOverlay.prototype = { |
| 66 __proto__: Page.prototype, | 66 __proto__: Page.prototype, |
| 67 | 67 |
| 68 /** @override */ | 68 /** @override */ |
| 69 initializePage: function() { | 69 initializePage: function() { |
| 70 Page.prototype.initializePage.call(this); | 70 Page.prototype.initializePage.call(this); |
| 71 | 71 |
| 72 var self = this; | 72 var self = this; |
| 73 |
| 74 // If 'profilesInfo' doesn't exist, it's forbidden to delete profile. |
| 75 // So don't display the delete-profile checkbox. |
| 76 if (!loadTimeData.valueExists('profilesInfo') && |
| 77 $('sync-setup-delete-profile')) { |
| 78 $('sync-setup-delete-profile').hidden = true; |
| 79 } |
| 80 |
| 73 $('basic-encryption-option').onchange = | 81 $('basic-encryption-option').onchange = |
| 74 $('full-encryption-option').onchange = function() { | 82 $('full-encryption-option').onchange = function() { |
| 75 self.onEncryptionRadioChanged_(); | 83 self.onEncryptionRadioChanged_(); |
| 76 }; | 84 }; |
| 77 $('choose-datatypes-cancel').onclick = | 85 $('choose-datatypes-cancel').onclick = |
| 78 $('confirm-everything-cancel').onclick = | 86 $('confirm-everything-cancel').onclick = |
| 79 $('stop-syncing-cancel').onclick = | 87 $('stop-syncing-cancel').onclick = |
| 80 $('sync-spinner-cancel').onclick = function() { | 88 $('sync-spinner-cancel').onclick = function() { |
| 81 self.closeOverlay_(); | 89 self.closeOverlay_(); |
| 82 }; | 90 }; |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 | 812 |
| 805 SyncSetupOverlay.showStopSyncingUI = function() { | 813 SyncSetupOverlay.showStopSyncingUI = function() { |
| 806 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | 814 SyncSetupOverlay.getInstance().showStopSyncingUI_(); |
| 807 }; | 815 }; |
| 808 | 816 |
| 809 // Export | 817 // Export |
| 810 return { | 818 return { |
| 811 SyncSetupOverlay: SyncSetupOverlay | 819 SyncSetupOverlay: SyncSetupOverlay |
| 812 }; | 820 }; |
| 813 }); | 821 }); |
| OLD | NEW |