Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add tests and link UpdateLogin to kSigninAllowed pref. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698