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 | 9 |
10 // | 10 // |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 expander.textContent = loadTimeData.getString('hideAdvancedSettings'); | 657 expander.textContent = loadTimeData.getString('hideAdvancedSettings'); |
658 }, | 658 }, |
659 | 659 |
660 /** | 660 /** |
661 * Updates the sync section with the given state. | 661 * Updates the sync section with the given state. |
662 * @param {Object} syncData A bunch of data records that describe the status | 662 * @param {Object} syncData A bunch of data records that describe the status |
663 * of the sync system. | 663 * of the sync system. |
664 * @private | 664 * @private |
665 */ | 665 */ |
666 updateSyncState_: function(syncData) { | 666 updateSyncState_: function(syncData) { |
667 if (!syncData.syncSystemEnabled) { | 667 if (!syncData.syncSystemEnabled || !syncData.signinAllowed) { |
668 $('sync-section').hidden = true; | 668 $('sync-section').hidden = true; |
669 return; | 669 return; |
670 } | 670 } |
671 | 671 |
672 $('sync-section').hidden = false; | 672 $('sync-section').hidden = false; |
673 this.signedIn = syncData.signedIn; | 673 this.signedIn = syncData.signedIn; |
674 // Display the "setup sync" button if we're signed in and sync is not | 674 // Display the "setup sync" button if we're signed in and sync is not |
675 // managed. | 675 // managed. |
676 $('customize-sync').hidden = !(syncData.signedIn && !syncData.managed); | 676 $('customize-sync').hidden = !(syncData.signedIn && !syncData.managed); |
677 | 677 |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 BrowserOptions.getLoggedInUsername = function() { | 1381 BrowserOptions.getLoggedInUsername = function() { |
1382 return BrowserOptions.getInstance().username_; | 1382 return BrowserOptions.getInstance().username_; |
1383 }; | 1383 }; |
1384 } | 1384 } |
1385 | 1385 |
1386 // Export | 1386 // Export |
1387 return { | 1387 return { |
1388 BrowserOptions: BrowserOptions | 1388 BrowserOptions: BrowserOptions |
1389 }; | 1389 }; |
1390 }); | 1390 }); |
OLD | NEW |