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 // True if the synced account uses a custom passphrase. | 8 // True if the synced account uses a custom passphrase. |
9 var usePassphrase_ = false; | 9 var usePassphrase_ = false; |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 self.closeOverlay_(); | 76 self.closeOverlay_(); |
77 }; | 77 }; |
78 $('confirm-everything-ok').onclick = function() { | 78 $('confirm-everything-ok').onclick = function() { |
79 self.sendConfiguration_(); | 79 self.sendConfiguration_(); |
80 }; | 80 }; |
81 $('timeout-ok').onclick = function() { | 81 $('timeout-ok').onclick = function() { |
82 chrome.send('CloseTimeout'); | 82 chrome.send('CloseTimeout'); |
83 self.closeOverlay_(); | 83 self.closeOverlay_(); |
84 }; | 84 }; |
85 $('stop-syncing-ok').onclick = function() { | 85 $('stop-syncing-ok').onclick = function() { |
86 chrome.send('SyncSetupStopSyncing'); | 86 var deleteProfile = $('delete-profile') != undefined && |
| 87 $('delete-profile').checked; |
| 88 chrome.send('SyncSetupStopSyncing', [deleteProfile]); |
87 self.closeOverlay_(); | 89 self.closeOverlay_(); |
88 }; | 90 }; |
89 }, | 91 }, |
90 | 92 |
91 showOverlay_: function() { | 93 showOverlay_: function() { |
92 OptionsPage.navigateToPage('syncSetup'); | 94 OptionsPage.navigateToPage('syncSetup'); |
93 }, | 95 }, |
94 | 96 |
95 closeOverlay_: function() { | 97 closeOverlay_: function() { |
96 this.syncConfigureArgs_ = null; | 98 this.syncConfigureArgs_ = null; |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 | 779 |
778 SyncSetupOverlay.showStopSyncingUI = function() { | 780 SyncSetupOverlay.showStopSyncingUI = function() { |
779 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | 781 SyncSetupOverlay.getInstance().showStopSyncingUI_(); |
780 }; | 782 }; |
781 | 783 |
782 // Export | 784 // Export |
783 return { | 785 return { |
784 SyncSetupOverlay: SyncSetupOverlay | 786 SyncSetupOverlay: SyncSetupOverlay |
785 }; | 787 }; |
786 }); | 788 }); |
OLD | NEW |