| 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 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
| 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; | 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; |
| 10 | 10 |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 // See http://crbug.com/268265. | 839 // See http://crbug.com/268265. |
| 840 var customizeSyncButtonNewText = syncData.setupCompleted ? | 840 var customizeSyncButtonNewText = syncData.setupCompleted ? |
| 841 loadTimeData.getString('customizeSync') : | 841 loadTimeData.getString('customizeSync') : |
| 842 loadTimeData.getString('syncButtonTextStart'); | 842 loadTimeData.getString('syncButtonTextStart'); |
| 843 if (customizeSyncButton.textContent != customizeSyncButtonNewText) | 843 if (customizeSyncButton.textContent != customizeSyncButtonNewText) |
| 844 customizeSyncButton.textContent = customizeSyncButtonNewText; | 844 customizeSyncButton.textContent = customizeSyncButtonNewText; |
| 845 | 845 |
| 846 // Disable the "sign in" button if we're currently signing in, or if we're | 846 // Disable the "sign in" button if we're currently signing in, or if we're |
| 847 // already signed in and signout is not allowed. | 847 // already signed in and signout is not allowed. |
| 848 var signInButton = $('start-stop-sync'); | 848 var signInButton = $('start-stop-sync'); |
| 849 signInButton.disabled = syncData.setupInProgress || | 849 signInButton.disabled = syncData.setupInProgress; |
| 850 !syncData.signoutAllowed; | |
| 851 this.signoutAllowed_ = syncData.signoutAllowed; | 850 this.signoutAllowed_ = syncData.signoutAllowed; |
| 852 if (!syncData.signoutAllowed) | 851 if (!syncData.signoutAllowed) |
| 853 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); | 852 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); |
| 854 else | 853 else |
| 855 $('start-stop-sync-indicator').removeAttribute('controlled-by'); | 854 $('start-stop-sync-indicator').removeAttribute('controlled-by'); |
| 856 | 855 |
| 857 // Hide the "sign in" button on Chrome OS, and show it on desktop Chrome. | 856 // Hide the "sign in" button on Chrome OS, and show it on desktop Chrome. |
| 858 signInButton.hidden = cr.isChromeOS; | 857 signInButton.hidden = cr.isChromeOS; |
| 859 | 858 |
| 860 signInButton.textContent = | 859 signInButton.textContent = |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 BrowserOptions.getLoggedInUsername = function() { | 1682 BrowserOptions.getLoggedInUsername = function() { |
| 1684 return BrowserOptions.getInstance().username_; | 1683 return BrowserOptions.getInstance().username_; |
| 1685 }; | 1684 }; |
| 1686 } | 1685 } |
| 1687 | 1686 |
| 1688 // Export | 1687 // Export |
| 1689 return { | 1688 return { |
| 1690 BrowserOptions: BrowserOptions | 1689 BrowserOptions: BrowserOptions |
| 1691 }; | 1690 }; |
| 1692 }); | 1691 }); |
| OLD | NEW |