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

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

Issue 405383002: The consumer management enroll and unenroll buttons should only be visible to the device owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/chromeos/consumer_management_overlay.js
diff --git a/chrome/browser/resources/options/chromeos/consumer_management_overlay.js b/chrome/browser/resources/options/chromeos/consumer_management_overlay.js
index 265510e2188d16f5536cf9e6d4c53f5d3039f754..d3a24f73f5cad52ce62d20857c1e75478a7a69db 100644
--- a/chrome/browser/resources/options/chromeos/consumer_management_overlay.js
+++ b/chrome/browser/resources/options/chromeos/consumer_management_overlay.js
@@ -17,6 +17,9 @@ cr.define('options', function() {
loadTimeData.getString('consumerManagementOverlayTabTitle'),
'consumer-management-overlay');
+ var isEnrolled = loadTimeData.getBoolean('consumerManagementEnrolled');
+ $('unenroll-content').hidden = !($('enroll-content').hidden = isEnrolled);
bartfab (slow) 2014/07/23 19:27:13 This line is doing too much at once. Especially th
davidyu 2014/07/24 04:28:30 I was asked to write it this way by the previous r
+
$('consumer-management-overlay-enroll').onclick = function(event) {
chrome.send('enrollConsumerManagement');
OptionsPage.closeOverlay();
@@ -39,14 +42,6 @@ cr.define('options', function() {
__proto__: OptionsPage.prototype,
};
- /**
- * Shows enrollment or unenrollment content based on the enrollment status.
- * @param {boolean} isEnrolled Whether the device is enrolled.
- */
- ConsumerManagementOverlay.setEnrollmentStatus = function(isEnrolled) {
- $('unenroll-content').hidden = !($('enroll-content').hidden = isEnrolled);
- };
-
// Export
return {
ConsumerManagementOverlay: ConsumerManagementOverlay

Powered by Google App Engine
This is Rietveld 408576698