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

Side by Side Diff: chrome/browser/resources/settings/people_page/people_page.js

Issue 2239973002: MD Settings: Use dom-if for the profile disconnect dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-people-page' is the settings page containing sign-in settings. 7 * 'settings-people-page' is the settings page containing sign-in settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-people-page', 10 is: 'settings-people-page',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 * True if the current profile manages supervised users. 46 * True if the current profile manages supervised users.
47 */ 47 */
48 profileManagesSupervisedUsers_: Boolean, 48 profileManagesSupervisedUsers_: Boolean,
49 49
50 /** @private {!settings.SyncBrowserProxy} */ 50 /** @private {!settings.SyncBrowserProxy} */
51 syncBrowserProxy_: { 51 syncBrowserProxy_: {
52 type: Object, 52 type: Object,
53 value: function() { 53 value: function() {
54 return settings.SyncBrowserProxyImpl.getInstance(); 54 return settings.SyncBrowserProxyImpl.getInstance();
55 }, 55 },
56
57 /** @private */
58 showingDisconnectDialog_: Boolean,
56 }, 59 },
57 60
58 <if expr="chromeos"> 61 <if expr="chromeos">
59 /** 62 /**
60 * True if quick unlock settings should be displayed on this machine. 63 * True if quick unlock settings should be displayed on this machine.
61 * @private 64 * @private
62 */ 65 */
63 quickUnlockEnabled_: { 66 quickUnlockEnabled_: {
64 type: Boolean, 67 type: Boolean,
65 value: function() { 68 value: function() {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 this.syncBrowserProxy_.openActivityControlsUrl(); 213 this.syncBrowserProxy_.openActivityControlsUrl();
211 }, 214 },
212 215
213 /** @private */ 216 /** @private */
214 onSigninTap_: function() { 217 onSigninTap_: function() {
215 this.syncBrowserProxy_.startSignIn(); 218 this.syncBrowserProxy_.startSignIn();
216 }, 219 },
217 220
218 /** @private */ 221 /** @private */
219 onDisconnectTap_: function() { 222 onDisconnectTap_: function() {
220 this.$.disconnectDialog.showModal(); 223 this.showingDisconnectDialog_ = true;
224 this.async(function() {
225 this.$$('#disconnectDialog').showModal();
226 }.bind(this));
221 }, 227 },
222 228
223 /** @private */ 229 /** @private */
224 onDisconnectCancel_: function() { 230 onDisconnectCancel_: function() {
225 this.$.disconnectDialog.close(); 231 this.$$('#disconnectDialog').close();
226 }, 232 },
227 233
228 /** @private */ 234 /** @private */
229 onDisconnectConfirm_: function() { 235 onDisconnectConfirm_: function() {
230 var deleteProfile = !!this.syncStatus.domain || 236 var deleteProfile = !!this.syncStatus.domain ||
231 (this.$.deleteProfile && this.$.deleteProfile.checked); 237 (this.$$('#deleteProfile') && this.$$('#deleteProfile').checked);
232 this.syncBrowserProxy_.signOut(deleteProfile); 238 this.syncBrowserProxy_.signOut(deleteProfile);
233 239
234 this.$.disconnectDialog.close(); 240 this.$$('#disconnectDialog').close();
235 }, 241 },
236 242
237 /** @private */ 243 /** @private */
244 onDisconnectDialogClosed_: function() {
245 this.showingDisconnectDialog_ = false;
246 },
247
248 /** @private */
238 onSyncTap_: function() { 249 onSyncTap_: function() {
239 assert(this.syncStatus.signedIn); 250 assert(this.syncStatus.signedIn);
240 assert(this.syncStatus.syncSystemEnabled); 251 assert(this.syncStatus.syncSystemEnabled);
241 252
242 if (this.syncStatus.managed) 253 if (this.syncStatus.managed)
243 return; 254 return;
244 255
245 settings.navigateTo(settings.Route.SYNC); 256 settings.navigateTo(settings.Route.SYNC);
246 }, 257 },
247 258
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 if (!syncStatus) 336 if (!syncStatus)
326 return ''; 337 return '';
327 if (syncStatus.hasError) 338 if (syncStatus.hasError)
328 return 'settings:sync-problem'; 339 return 'settings:sync-problem';
329 if (syncStatus.managed) 340 if (syncStatus.managed)
330 return 'settings:sync-disabled'; 341 return 'settings:sync-disabled';
331 342
332 return 'settings:done'; 343 return 'settings:done';
333 }, 344 },
334 }); 345 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698