Chromium Code Reviews| Index: chrome/browser/resources/options/chromeos/network_list.js |
| diff --git a/chrome/browser/resources/options/chromeos/network_list.js b/chrome/browser/resources/options/chromeos/network_list.js |
| index e2ac57c5a831870bbdc42641e56b0f1f192317de..b8b6db13a59754f7480cc5e5600af8f6489b6e82 100644 |
| --- a/chrome/browser/resources/options/chromeos/network_list.js |
| +++ b/chrome/browser/resources/options/chromeos/network_list.js |
| @@ -112,6 +112,16 @@ cr.define('options.network', function() { |
| var defaultIcons_ = {}; |
| /** |
| + * Contains the current logged in user type, which is one of 'none', |
| + * 'regular', 'owner', 'guest', 'retail-mode', 'public-account', |
| + * 'locally-managed', and 'kiosk-app', or empty string if the data has not |
| + * been set. |
| + * @type {string} |
| + * @private |
| + */ |
| + var loggedInUserType_ = ''; |
| + |
| + /** |
| * Create an element in the network list for controlling network |
| * connectivity. |
| * @param {Object} data Description of the network list or command. |
| @@ -463,7 +473,8 @@ cr.define('options.network', function() { |
| var label = enableDataRoaming_ ? 'disableDataRoaming' : |
| 'enableDataRoaming'; |
| - var disabled = !UIAccountTweaks.currentUserIsOwner(); |
| + var disabled = !(loggedInUserType_ == 'owner' || |
| + UIAccountTweaks.currentUserIsOwner()); |
|
stevenjb
2013/09/10 16:58:05
Do we still need toe UIAccountTweaks check? If so,
armansito
2013/09/10 21:55:19
I originally thought that we should use UIAccountT
|
| var entry = {label: loadTimeData.getString(label), |
| data: {}}; |
| if (disabled) { |
| @@ -933,6 +944,14 @@ cr.define('options.network', function() { |
| }; |
| /** |
| + * Sets the current logged in user type. |
| + * @param {string} userType Current logged in user type. |
| + */ |
| + NetworkList.updateLoggedInUserType = function(userType) { |
| + loggedInUserType_ = String(userType); |
| + }; |
| + |
| + /** |
| * Chrome callback for updating network controls. |
| * @param {Object} data Description of available network devices and their |
| * corresponding state. |