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

Side by Side Diff: chrome/browser/resources/sync_setup_overlay.js

Issue 552393003: Hide delete-profile checkbox when profile deletion is forbidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check existence of checkbox Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var Page = cr.ui.pageManager.Page; 6 /** @const */ var Page = cr.ui.pageManager.Page;
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
8 8
9 // True if the synced account uses a custom passphrase. 9 // True if the synced account uses a custom passphrase.
10 var usePassphrase_ = false; 10 var usePassphrase_ = false;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 cr.addSingletonGetter(SyncSetupOverlay); 63 cr.addSingletonGetter(SyncSetupOverlay);
64 64
65 SyncSetupOverlay.prototype = { 65 SyncSetupOverlay.prototype = {
66 __proto__: Page.prototype, 66 __proto__: Page.prototype,
67 67
68 /** @override */ 68 /** @override */
69 initializePage: function() { 69 initializePage: function() {
70 Page.prototype.initializePage.call(this); 70 Page.prototype.initializePage.call(this);
71 71
72 var self = this; 72 var self = this;
73
74 // If 'profilesInfo' doesn't exist, it's forbidden to delete profile.
75 // So don't display the delete-profile checkbox.
76 if (!loadTimeData.valueExists('profilesInfo') &&
77 $('sync-setup-delete-profile')) {
78 $('sync-setup-delete-profile').hidden = true;
79 }
80
73 $('basic-encryption-option').onchange = 81 $('basic-encryption-option').onchange =
74 $('full-encryption-option').onchange = function() { 82 $('full-encryption-option').onchange = function() {
75 self.onEncryptionRadioChanged_(); 83 self.onEncryptionRadioChanged_();
76 }; 84 };
77 $('choose-datatypes-cancel').onclick = 85 $('choose-datatypes-cancel').onclick =
78 $('confirm-everything-cancel').onclick = 86 $('confirm-everything-cancel').onclick =
79 $('stop-syncing-cancel').onclick = 87 $('stop-syncing-cancel').onclick =
80 $('sync-spinner-cancel').onclick = function() { 88 $('sync-spinner-cancel').onclick = function() {
81 self.closeOverlay_(); 89 self.closeOverlay_();
82 }; 90 };
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 812
805 SyncSetupOverlay.showStopSyncingUI = function() { 813 SyncSetupOverlay.showStopSyncingUI = function() {
806 SyncSetupOverlay.getInstance().showStopSyncingUI_(); 814 SyncSetupOverlay.getInstance().showStopSyncingUI_();
807 }; 815 };
808 816
809 // Export 817 // Export
810 return { 818 return {
811 SyncSetupOverlay: SyncSetupOverlay 819 SyncSetupOverlay: SyncSetupOverlay
812 }; 820 };
813 }); 821 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698