From d0f399aaf2f29070067d726f301b8b2a06513c36 Mon Sep 17 00:00:00 2001 From: haitaol Date: Thu, 11 Sep 2014 14:37:48 -0700 Subject: [PATCH] Hide delete-profile checkbox when profile deletion is forbidden. BUG=408446,413226 TBR=tim@chromium.org Review URL: https://codereview.chromium.org/552393003 Cr-Commit-Position: refs/heads/master@{#294471} --- chrome/browser/resources/sync_setup_overlay.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chrome/browser/resources/sync_setup_overlay.js b/chrome/browser/resources/sync_setup_overlay.js index bb2f316437fa..6d6dc9dd3fdd 100644 --- a/chrome/browser/resources/sync_setup_overlay.js +++ b/chrome/browser/resources/sync_setup_overlay.js @@ -70,6 +70,14 @@ cr.define('options', function() { Page.prototype.initializePage.call(this); var self = this; + + // If 'profilesInfo' doesn't exist, it's forbidden to delete profile. + // So don't display the delete-profile checkbox. + if (!loadTimeData.valueExists('profilesInfo') && + $('sync-setup-delete-profile')) { + $('sync-setup-delete-profile').hidden = true; + } + $('basic-encryption-option').onchange = $('full-encryption-option').onchange = function() { self.onEncryptionRadioChanged_(); -- 2.11.4.GIT