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

Unified Diff: chrome/browser/resources/options/chromeos/network_list.js

Issue 23447027: Merge 222390 "network_list.js should reflect the correct logged ..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/internet_options_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/chromeos/network_list.js
===================================================================
--- chrome/browser/resources/options/chromeos/network_list.js (revision 222879)
+++ chrome/browser/resources/options/chromeos/network_list.js (working copy)
@@ -112,6 +112,16 @@
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,7 @@
var label = enableDataRoaming_ ? 'disableDataRoaming' :
'enableDataRoaming';
- var disabled = !UIAccountTweaks.currentUserIsOwner();
+ var disabled = loggedInUserType_ != 'owner';
var entry = {label: loadTimeData.getString(label),
data: {}};
if (disabled) {
@@ -933,6 +943,14 @@
};
/**
+ * 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.
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/internet_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698