Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 ManageProfileOverlay.showDeleteDialog(selectedProfile); | 200 ManageProfileOverlay.showDeleteDialog(selectedProfile); |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 if (cr.isChromeOS) { | 203 if (cr.isChromeOS) { |
| 204 // Username (canonical email) of the currently logged in user or | 204 // Username (canonical email) of the currently logged in user or |
| 205 // |kGuestUser| if a guest session is active. | 205 // |kGuestUser| if a guest session is active. |
| 206 this.username_ = localStrings.getString('username'); | 206 this.username_ = localStrings.getString('username'); |
| 207 | 207 |
| 208 this.updateAccountPicture_(); | 208 this.updateAccountPicture_(); |
| 209 | 209 |
| 210 if (cr.commandLine && cr.commandLine.options['--bwsi']) { | 210 if (localStrings.getString('current_user_is_ephemeral') != 'true') { |
| 211 // Disable the screen lock checkbox in guest mode. | 211 // Enable picture changing for non-ephemeral users. |
| 212 $('enable-screen-lock').disabled = true; | |
| 213 | |
| 214 // Hide the startup section in Guest mode. | |
| 215 $('startup-section').hidden = true; | |
| 216 } else { | |
| 217 $('account-picture-wrapper').onclick = function(event) { | 212 $('account-picture-wrapper').onclick = function(event) { |
| 218 OptionsPage.navigateToPage('changePicture'); | 213 OptionsPage.navigateToPage('changePicture'); |
| 219 }; | 214 }; |
| 215 } else { | |
| 216 // Hide picture changing option for ephemeral users. | |
|
Nikita (slow)
2012/03/07 10:03:04
Please remove this code. Already taken care for Gu
use bartfab instead
2012/03/07 11:10:08
Done.
| |
| 217 $('change-picture-caption').hidden = true; | |
| 218 | |
| 219 if (cr.commandLine && cr.commandLine.options['--bwsi']) { | |
| 220 // Disable the screen lock checkbox in guest mode. | |
| 221 $('enable-screen-lock').disabled = true; | |
| 222 | |
| 223 // Hide the startup section in guest mode. | |
| 224 $('startup-section').hidden = true; | |
| 220 } | 225 } |
| 221 | 226 |
| 222 $('manage-accounts-button').onclick = function(event) { | 227 $('manage-accounts-button').onclick = function(event) { |
| 223 OptionsPage.navigateToPage('accounts'); | 228 OptionsPage.navigateToPage('accounts'); |
| 224 chrome.send('coreOptionsUserMetricsAction', | 229 chrome.send('coreOptionsUserMetricsAction', |
| 225 ['Options_ManageAccounts']); | 230 ['Options_ManageAccounts']); |
| 226 }; | 231 }; |
| 227 } else { | 232 } else { |
| 228 $('import-data').onclick = function(event) { | 233 $('import-data').onclick = function(event) { |
| 229 // Make sure that any previous import success message is hidden, and | 234 // Make sure that any previous import success message is hidden, and |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1234 BrowserOptions.getLoggedInUsername = function() { | 1239 BrowserOptions.getLoggedInUsername = function() { |
| 1235 return BrowserOptions.getInstance().username_; | 1240 return BrowserOptions.getInstance().username_; |
| 1236 }; | 1241 }; |
| 1237 } | 1242 } |
| 1238 | 1243 |
| 1239 // Export | 1244 // Export |
| 1240 return { | 1245 return { |
| 1241 BrowserOptions: BrowserOptions | 1246 BrowserOptions: BrowserOptions |
| 1242 }; | 1247 }; |
| 1243 }); | 1248 }); |
| OLD | NEW |