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

Unified Diff: chrome/browser/resources/history/history.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/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index 6471089713b6dc028f976c0e707e06641b004a9e..95320a5ae356693a4d94b49b062301227ed0158f 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -1476,12 +1476,13 @@ function load() {
if (loadTimeData.getBoolean('isManagedProfile')) {
$('allow-selected').hidden = false;
$('block-selected').hidden = false;
- $('lock-unlock-button').classList.add('profile-is-managed');
-
- $('lock-unlock-button').addEventListener('click', function(e) {
- var isLocked = document.body.classList.contains('managed-user-locked');
- chrome.send('setManagedUserElevated', [isLocked]);
- });
+ if (!cr.isChromeOS) {
+ $('lock-unlock-button').classList.add('profile-is-managed');
+ $('lock-unlock-button').addEventListener('click', function(e) {
+ var isLocked = document.body.classList.contains('managed-user-locked');
+ chrome.send('setManagedUserElevated', [isLocked]);
+ });
+ }
chrome.send('getManagedUserElevated');
}
@@ -1840,11 +1841,15 @@ function updateEntries(entries) {
function managedUserElevated(isElevated) {
Bernhard Bauer 2013/04/11 13:31:18 Do we even expect this whole method to be called o
Adrian Kuegel 2013/04/11 15:56:10 I guess I should move the call to chrome.send('get
if (isElevated) {
document.body.classList.remove('managed-user-locked');
- $('lock-unlock-button').textContent = loadTimeData.getString('lockButton');
+ if (!cr.isChromeOS)
+ $('lock-unlock-button').textContent =
+ loadTimeData.getString('lockButton');
} else {
document.body.classList.add('managed-user-locked');
- $('lock-unlock-button').textContent =
- loadTimeData.getString('unlockButton');
+ if (!cr.isChromeOS) {
+ $('lock-unlock-button').textContent =
+ loadTimeData.getString('unlockButton');
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698