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

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

Issue 167723002: Don't display multi-profile under Guest user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 $('default-search-engine').addEventListener('change', 183 $('default-search-engine').addEventListener('change',
184 this.setDefaultSearchEngine_); 184 this.setDefaultSearchEngine_);
185 // Without this, the bubble would overlap the uber frame navigation pane 185 // Without this, the bubble would overlap the uber frame navigation pane
186 // and would not get mouse event as explained in crbug.com/311421. 186 // and would not get mouse event as explained in crbug.com/311421.
187 document.querySelector( 187 document.querySelector(
188 '#default-search-engine + .controlled-setting-indicator').location = 188 '#default-search-engine + .controlled-setting-indicator').location =
189 cr.ui.ArrowLocation.TOP_START; 189 cr.ui.ArrowLocation.TOP_START;
190 190
191 // Users section. 191 // Users section.
192 if (loadTimeData.valueExists('profilesInfo')) { 192 if (loadTimeData.valueExists('profilesInfo')) {
193 $('sync-users-section').hidden = false;
193 $('profiles-section').hidden = false; 194 $('profiles-section').hidden = false;
194 195
195 var profilesList = $('profiles-list'); 196 var profilesList = $('profiles-list');
196 options.browser_options.ProfileList.decorate(profilesList); 197 options.browser_options.ProfileList.decorate(profilesList);
197 profilesList.autoExpands = true; 198 profilesList.autoExpands = true;
198 199
199 // The profiles info data in |loadTimeData| might be stale. 200 // The profiles info data in |loadTimeData| might be stale.
200 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); 201 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo'));
201 chrome.send('requestProfilesInfo'); 202 chrome.send('requestProfilesInfo');
202 203
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 $('enable-auto-login-checkbox').hidden = !syncData.autoLoginVisible; 861 $('enable-auto-login-checkbox').hidden = !syncData.autoLoginVisible;
861 }, 862 },
862 863
863 /** 864 /**
864 * Update the UI depending on whether the current profile manages any 865 * Update the UI depending on whether the current profile manages any
865 * supervised users. 866 * supervised users.
866 * @param {boolean} value True if the current profile manages any supervised 867 * @param {boolean} value True if the current profile manages any supervised
867 * users. 868 * users.
868 */ 869 */
869 updateManagesSupervisedUsers_: function(value) { 870 updateManagesSupervisedUsers_: function(value) {
870 $('profiles-supervised-dashboard-tip').hidden = !value; 871 if (value) {
872 $('sync-users-section').hidden = false;
873 $('profiles-supervised-dashboard-tip').hidden = false;
874 } else {
875 $('profiles-supervised-dashboard-tip').hidden = true;
876 }
871 }, 877 },
872 878
873 /** 879 /**
874 * Get the start/stop sync button DOM element. Used for testing. 880 * Get the start/stop sync button DOM element. Used for testing.
875 * @return {DOMElement} The start/stop sync button. 881 * @return {DOMElement} The start/stop sync button.
876 * @private 882 * @private
877 */ 883 */
878 getStartStopSyncButton_: function() { 884 getStartStopSyncButton_: function() {
879 return $('start-stop-sync'); 885 return $('start-stop-sync');
880 }, 886 },
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 BrowserOptions.getLoggedInUsername = function() { 1638 BrowserOptions.getLoggedInUsername = function() {
1633 return BrowserOptions.getInstance().username_; 1639 return BrowserOptions.getInstance().username_;
1634 }; 1640 };
1635 } 1641 }
1636 1642
1637 // Export 1643 // Export
1638 return { 1644 return {
1639 BrowserOptions: BrowserOptions 1645 BrowserOptions: BrowserOptions
1640 }; 1646 };
1641 }); 1647 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698