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

Unified Diff: chrome/browser/resources/options/managed_user_settings.js

Issue 14066003: Don't allow elevation for CHROME_OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unlock buttons. Created 7 years, 8 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
Index: chrome/browser/resources/options/managed_user_settings.js
diff --git a/chrome/browser/resources/options/managed_user_settings.js b/chrome/browser/resources/options/managed_user_settings.js
index fb51882ed4ad6f87603761f44b7bf6f5477ea957..9890c61fb5ffef486309459a593b5d34586628b3 100644
--- a/chrome/browser/resources/options/managed_user_settings.js
+++ b/chrome/browser/resources/options/managed_user_settings.js
@@ -83,21 +83,23 @@ cr.define('options', function() {
var self = this;
- $('lock-settings').onclick = function() {
- chrome.send('setElevated', [false]);
- // The managed user is currently authenticated, so don't wait for a
- // callback to set the new authentication state since a reset to not
- // elevated is done without showing the passphrase dialog.
- self.authenticationState = ManagedUserAuthentication.UNAUTHENTICATED;
- self.enableControls(false);
- };
-
- $('unlock-settings').onclick = function() {
- if (self.authenticationState == ManagedUserAuthentication.CHECKING)
- return;
- self.authenticationState = ManagedUserAuthentication.CHECKING;
- chrome.send('setElevated', [true]);
- };
+ if (!cr.isChromeOS) {
+ $('lock-settings').onclick = function() {
+ chrome.send('setElevated', [false]);
+ // The managed user is currently authenticated, so don't wait for a
+ // callback to set the new authentication state since a reset to not
+ // elevated is done without showing the passphrase dialog.
+ self.authenticationState = ManagedUserAuthentication.UNAUTHENTICATED;
+ self.enableControls(false);
+ };
+
+ $('unlock-settings').onclick = function() {
+ if (self.authenticationState == ManagedUserAuthentication.CHECKING)
+ return;
+ self.authenticationState = ManagedUserAuthentication.CHECKING;
+ chrome.send('setElevated', [true]);
+ };
+ }
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698