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

Side by Side Diff: chrome/browser/resources/options/chromeos/accounts_options.js

Issue 7171018: User Settings on CrOS now shows the managed banner for enrolled devices. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed comments. Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // AccountsOptions class: 10 // AccountsOptions class:
(...skipping 23 matching lines...) Expand all
34 // Set up accounts page. 34 // Set up accounts page.
35 var userList = $('userList'); 35 var userList = $('userList');
36 36
37 var userNameEdit = $('userNameEdit'); 37 var userNameEdit = $('userNameEdit');
38 options.accounts.UserNameEdit.decorate(userNameEdit); 38 options.accounts.UserNameEdit.decorate(userNameEdit);
39 userNameEdit.addEventListener('add', this.handleAddUser_); 39 userNameEdit.addEventListener('add', this.handleAddUser_);
40 40
41 // If the current user is not the owner, show some warning, 41 // If the current user is not the owner, show some warning,
42 // and do not show the user list. 42 // and do not show the user list.
43 if (AccountsOptions.currentUserIsOwner()) { 43 if (AccountsOptions.currentUserIsOwner()) {
44 options.accounts.UserList.decorate(userList);
45 } else {
44 if (!AccountsOptions.whitelistIsManaged()) { 46 if (!AccountsOptions.whitelistIsManaged()) {
45 options.accounts.UserList.decorate(userList); 47 $('ownerOnlyWarning').hidden = false;
48 } else {
49 this.managed = true;
46 } 50 }
47 } else {
48 $('ownerOnlyWarning').hidden = false;
49 } 51 }
50 52
51 this.addEventListener('visibleChange', this.handleVisibleChange_); 53 this.addEventListener('visibleChange', this.handleVisibleChange_);
52 54
53 $('useWhitelistCheck').addEventListener('change', 55 $('useWhitelistCheck').addEventListener('change',
54 this.handleUseWhitelistCheckChange_.bind(this)); 56 this.handleUseWhitelistCheckChange_.bind(this));
55 57
56 Preferences.getInstance().addEventListener( 58 Preferences.getInstance().addEventListener(
57 $('useWhitelistCheck').pref, 59 $('useWhitelistCheck').pref,
58 this.handleUseWhitelistPrefChange_.bind(this)); 60 this.handleUseWhitelistPrefChange_.bind(this));
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 var userList = $('userList'); 152 var userList = $('userList');
151 userList.updateAccountPicture(email, imageUrl); 153 userList.updateAccountPicture(email, imageUrl);
152 }; 154 };
153 155
154 // Export 156 // Export
155 return { 157 return {
156 AccountsOptions: AccountsOptions 158 AccountsOptions: AccountsOptions
157 }; 159 };
158 160
159 }); 161 });
OLDNEW
« no previous file with comments | « chrome/browser/policy/managed_prefs_banner_base.cc ('k') | chrome/browser/ui/options/options_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698