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

Unified Diff: chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js

Issue 2450843002: Indicate that sync was disabled by administrator. (Closed)
Patch Set: Clean-up (prepare for review) Created 4 years, 2 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/signin/sync_confirmation/sync_confirmation.js
diff --git a/chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js b/chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js
index e22b4ddecc67c1dd4ebc7bdcea9dbb88703c9b5f..0a08712507f0ef9fdba0307f56219c7fa46a114f 100644
--- a/chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js
+++ b/chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js
@@ -21,8 +21,13 @@ cr.define('sync.confirmation', function() {
document.addEventListener('keydown', onKeyDown);
$('confirmButton').addEventListener('click', onConfirm);
$('undoButton').addEventListener('click', onUndo);
- $('settingsLink').addEventListener('click', onGoToSettings);
- $('profile-picture').addEventListener('load', onPictureLoaded);
+ if (loadTimeData.getBoolean('isSyncAllowed')) {
+ $('settingsLink').addEventListener('click', onGoToSettings);
+ $('profile-picture').addEventListener('load', onPictureLoaded);
+ $('syncDisabledDetails').hidden = true;
+ } else {
+ $('syncConfirmationDetails').hidden = true;
+ }
chrome.send('initializedWithSize', [document.body.scrollHeight]);
}
@@ -31,11 +36,15 @@ cr.define('sync.confirmation', function() {
}
function setUserImageURL(url) {
- $('profile-picture').src = url;
+ if (loadTimeData.getBoolean('isSyncAllowed')) {
+ $('profile-picture').src = url;
+ }
}
function onPictureLoaded(e) {
- $('picture-container').classList.add('loaded');
+ if (loadTimeData.getBoolean('isSyncAllowed')) {
+ $('picture-container').classList.add('loaded');
+ }
}
function onKeyDown(e) {

Powered by Google App Engine
This is Rietveld 408576698