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

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

Issue 279243002: Cleanup browser_options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | 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 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator;
10 10
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 if (!syncData.signinAllowed && 830 if (!syncData.signinAllowed &&
831 (!syncData.supervisedUser || !cr.isChromeOS)) { 831 (!syncData.supervisedUser || !cr.isChromeOS)) {
832 $('sync-section').hidden = true; 832 $('sync-section').hidden = true;
833 this.maybeShowUserSection_(); 833 this.maybeShowUserSection_();
834 return; 834 return;
835 } 835 }
836 836
837 $('sync-section').hidden = false; 837 $('sync-section').hidden = false;
838 this.maybeShowUserSection_(); 838 this.maybeShowUserSection_();
839 839
840 var subSection = $('sync-section').firstChild; 840 if (cr.isChromeOS && syncData.supervisedUser) {
841 while (subSection) { 841 var subSection = $('sync-section').firstChild;
842 if (subSection.nodeType == Node.ELEMENT_NODE) 842 while (subSection) {
843 subSection.hidden = syncData.supervisedUser; 843 if (subSection.nodeType == Node.ELEMENT_NODE)
844 subSection = subSection.nextSibling; 844 subSection.hidden = true;
845 } 845 subSection = subSection.nextSibling;
846 }
846 847
847 if (syncData.supervisedUser) {
848 $('account-picture-wrapper').hidden = false; 848 $('account-picture-wrapper').hidden = false;
Marc Treib 2014/05/12 16:26:50 E.g. account-picture-wrapper and sync-general only
849 $('sync-general').hidden = false; 849 $('sync-general').hidden = false;
850 $('sync-status').hidden = true; 850 $('sync-status').hidden = true;
851
851 return; 852 return;
852 } 853 }
853 854
854 // If the user gets signed out while the advanced sync settings dialog is 855 // If the user gets signed out while the advanced sync settings dialog is
855 // visible, say, due to a dashboard clear, close the dialog. 856 // visible, say, due to a dashboard clear, close the dialog.
856 // However, if the user gets signed out as a result of abandoning first 857 // However, if the user gets signed out as a result of abandoning first
857 // time sync setup, do not call closeOverlay as it will redirect the 858 // time sync setup, do not call closeOverlay as it will redirect the
858 // browser to the main settings page and override any in-progress 859 // browser to the main settings page and override any in-progress
859 // user-initiated navigation. See crbug.com/278030. 860 // user-initiated navigation. See crbug.com/278030.
860 // Note: SyncSetupOverlay.closeOverlay is a no-op if the overlay is 861 // Note: SyncSetupOverlay.closeOverlay is a no-op if the overlay is
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 BrowserOptions.getLoggedInUsername = function() { 1822 BrowserOptions.getLoggedInUsername = function() {
1822 return BrowserOptions.getInstance().username_; 1823 return BrowserOptions.getInstance().username_;
1823 }; 1824 };
1824 } 1825 }
1825 1826
1826 // Export 1827 // Export
1827 return { 1828 return {
1828 BrowserOptions: BrowserOptions 1829 BrowserOptions: BrowserOptions
1829 }; 1830 };
1830 }); 1831 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698