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

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

Issue 12210144: Properly clear the controlled-by attribute if signout is allowed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 $('customize-sync').hidden = !syncData.signedIn || 677 $('customize-sync').hidden = !syncData.signedIn ||
678 syncData.managed || !syncData.syncSystemEnabled; 678 syncData.managed || !syncData.syncSystemEnabled;
679 679
680 var startStopButton = $('start-stop-sync'); 680 var startStopButton = $('start-stop-sync');
681 // Disable the "start/stop syncing" if we're currently signing in, or 681 // Disable the "start/stop syncing" if we're currently signing in, or
682 // if we're already signed in and signout is not allowed. 682 // if we're already signed in and signout is not allowed.
683 startStopButton.disabled = syncData.setupInProgress || 683 startStopButton.disabled = syncData.setupInProgress ||
684 !syncData.signoutAllowed; 684 !syncData.signoutAllowed;
685 if (!syncData.signoutAllowed) 685 if (!syncData.signoutAllowed)
686 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); 686 $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy');
687 else
688 $('start-stop-sync-indicator').removeAttribute('controlled-by');
687 startStopButton.hidden = 689 startStopButton.hidden =
688 syncData.setupCompleted && cr.isChromeOS; 690 syncData.setupCompleted && cr.isChromeOS;
689 startStopButton.textContent = 691 startStopButton.textContent =
690 syncData.signedIn ? 692 syncData.signedIn ?
691 loadTimeData.getString('syncButtonTextStop') : 693 loadTimeData.getString('syncButtonTextStop') :
692 syncData.setupInProgress ? 694 syncData.setupInProgress ?
693 loadTimeData.getString('syncButtonTextInProgress') : 695 loadTimeData.getString('syncButtonTextInProgress') :
694 loadTimeData.getString('syncButtonTextStart'); 696 loadTimeData.getString('syncButtonTextStart');
695 $('start-stop-sync-indicator').hidden = startStopButton.hidden; 697 $('start-stop-sync-indicator').hidden = startStopButton.hidden;
696 698
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 BrowserOptions.getLoggedInUsername = function() { 1392 BrowserOptions.getLoggedInUsername = function() {
1391 return BrowserOptions.getInstance().username_; 1393 return BrowserOptions.getInstance().username_;
1392 }; 1394 };
1393 } 1395 }
1394 1396
1395 // Export 1397 // Export
1396 return { 1398 return {
1397 BrowserOptions: BrowserOptions 1399 BrowserOptions: BrowserOptions
1398 }; 1400 };
1399 }); 1401 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698