OLD | NEW |
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 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 | 7 |
8 ///////////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////////// |
9 // AccountsOptions class: | 9 // AccountsOptions class: |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 * Returns whether the current user is owner or not. | 131 * Returns whether the current user is owner or not. |
132 */ | 132 */ |
133 AccountsOptions.currentUserIsOwner = function() { | 133 AccountsOptions.currentUserIsOwner = function() { |
134 return localStrings.getString('current_user_is_owner') == 'true'; | 134 return localStrings.getString('current_user_is_owner') == 'true'; |
135 }; | 135 }; |
136 | 136 |
137 /** | 137 /** |
138 * Returns whether we're currently in guest mode. | 138 * Returns whether we're currently in guest mode. |
139 */ | 139 */ |
140 AccountsOptions.loggedInAsGuest = function() { | 140 AccountsOptions.loggedInAsGuest = function() { |
141 return localStrings.getString('logged_in_as_guest') == 'true'; | 141 return localStrings.getString('loggedInAsGuest') == 'true'; |
142 }; | 142 }; |
143 | 143 |
144 /** | 144 /** |
145 * Returns whether the whitelist is managed by policy or not. | 145 * Returns whether the whitelist is managed by policy or not. |
146 */ | 146 */ |
147 AccountsOptions.whitelistIsManaged = function() { | 147 AccountsOptions.whitelistIsManaged = function() { |
148 return localStrings.getString('whitelist_is_managed') == 'true'; | 148 return localStrings.getString('whitelist_is_managed') == 'true'; |
149 }; | 149 }; |
150 | 150 |
151 /** | 151 /** |
152 * Update account picture. | 152 * Update account picture. |
153 * @param {string} username User for which to update the image. | 153 * @param {string} username User for which to update the image. |
154 */ | 154 */ |
155 AccountsOptions.updateAccountPicture = function(username) { | 155 AccountsOptions.updateAccountPicture = function(username) { |
156 if (this.showWhitelist_) | 156 if (this.showWhitelist_) |
157 $('userList').updateAccountPicture(username); | 157 $('userList').updateAccountPicture(username); |
158 }; | 158 }; |
159 | 159 |
160 // Export | 160 // Export |
161 return { | 161 return { |
162 AccountsOptions: AccountsOptions | 162 AccountsOptions: AccountsOptions |
163 }; | 163 }; |
164 | 164 |
165 }); | 165 }); |
OLD | NEW |