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

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: Fix bug in set_elevated function. 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 e1a1b2c54abbc602ea60e1aae98995b5e1f3f37b..4cec356f7ba147a52efb496589b4c85e392852f6 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -1470,14 +1470,14 @@ 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]);
- });
-
- chrome.send('getManagedUserElevated');
+ 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');
+ }
}
var title = loadTimeData.getString('title');
@@ -1834,7 +1834,8 @@ function updateEntries(entries) {
function managedUserElevated(isElevated) {
if (isElevated) {
document.body.classList.remove('managed-user-locked');
- $('lock-unlock-button').textContent = loadTimeData.getString('lockButton');
+ $('lock-unlock-button').textContent =
+ loadTimeData.getString('lockButton');
} else {
document.body.classList.add('managed-user-locked');
$('lock-unlock-button').textContent =
« no previous file with comments | « chrome/browser/resources/history/history.html ('k') | chrome/browser/resources/managed_mode_block_interstitial.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698