| OLD | NEW |
| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 'easy-unlock-enabled-status', | 143 'easy-unlock-enabled-status', |
| 144 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 144 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
| 145 this.easyUnlockBrowserProxy_.getEnabledStatus().then( | 145 this.easyUnlockBrowserProxy_.getEnabledStatus().then( |
| 146 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 146 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
| 147 } | 147 } |
| 148 </if> | 148 </if> |
| 149 }, | 149 }, |
| 150 | 150 |
| 151 /** @protected */ | 151 /** @protected */ |
| 152 currentRouteChanged: function() { | 152 currentRouteChanged: function() { |
| 153 this.showImportDataDialog_ = |
| 154 settings.getCurrentRoute() == settings.Route.IMPORT_DATA; |
| 155 |
| 153 if (settings.getCurrentRoute() == settings.Route.SIGN_OUT) { | 156 if (settings.getCurrentRoute() == settings.Route.SIGN_OUT) { |
| 154 // If the sync status has not been fetched yet, optimistically display | 157 // If the sync status has not been fetched yet, optimistically display |
| 155 // the disconnect dialog. There is another check when the sync status is | 158 // the disconnect dialog. There is another check when the sync status is |
| 156 // fetched. The dialog will be closed then the user is not signed in. | 159 // fetched. The dialog will be closed then the user is not signed in. |
| 157 if (this.syncStatus && !this.syncStatus.signedIn) | 160 if (this.syncStatus && !this.syncStatus.signedIn) |
| 158 settings.navigateToPreviousRoute(); | 161 settings.navigateToPreviousRoute(); |
| 159 else | 162 else |
| 160 this.$.disconnectDialog.showModal(); | 163 this.$.disconnectDialog.showModal(); |
| 161 } else if (this.$.disconnectDialog.open) { | 164 } else if (this.$.disconnectDialog.open) { |
| 162 this.$.disconnectDialog.close(); | 165 this.$.disconnectDialog.close(); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 * @return {string} | 355 * @return {string} |
| 353 */ | 356 */ |
| 354 getDomainHtml_: function(domain) { | 357 getDomainHtml_: function(domain) { |
| 355 var innerSpan = | 358 var innerSpan = |
| 356 '<span id="managed-by-domain-name">' + domain + '</span>'; | 359 '<span id="managed-by-domain-name">' + domain + '</span>'; |
| 357 return loadTimeData.getStringF('domainManagedProfile', innerSpan); | 360 return loadTimeData.getStringF('domainManagedProfile', innerSpan); |
| 358 }, | 361 }, |
| 359 | 362 |
| 360 /** @private */ | 363 /** @private */ |
| 361 onImportDataTap_: function() { | 364 onImportDataTap_: function() { |
| 362 this.showImportDataDialog_ = true; | 365 settings.navigateTo(settings.Route.IMPORT_DATA); |
| 363 }, | 366 }, |
| 364 | 367 |
| 365 /** @private */ | 368 /** @private */ |
| 366 onImportDataDialogClosed_: function() { | 369 onImportDataDialogClosed_: function() { |
| 367 this.showImportDataDialog_ = false; | 370 settings.navigateToPreviousRoute(); |
| 368 }, | 371 }, |
| 369 </if> | 372 </if> |
| 370 | 373 |
| 371 /** | 374 /** |
| 372 * @private | 375 * @private |
| 373 * @param {string} domain | 376 * @param {string} domain |
| 374 * @return {string} | 377 * @return {string} |
| 375 */ | 378 */ |
| 376 getDisconnectExplanationHtml_: function(domain) { | 379 getDisconnectExplanationHtml_: function(domain) { |
| 377 <if expr="not chromeos"> | 380 <if expr="not chromeos"> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 450 |
| 448 /** | 451 /** |
| 449 * @param {!settings.SyncStatus} syncStatus | 452 * @param {!settings.SyncStatus} syncStatus |
| 450 * @return {boolean} Whether to show the "Sign in to Chrome" button. | 453 * @return {boolean} Whether to show the "Sign in to Chrome" button. |
| 451 * @private | 454 * @private |
| 452 */ | 455 */ |
| 453 showSignin_: function(syncStatus) { | 456 showSignin_: function(syncStatus) { |
| 454 return !!syncStatus.signinAllowed && !syncStatus.signedIn; | 457 return !!syncStatus.signinAllowed && !syncStatus.signedIn; |
| 455 }, | 458 }, |
| 456 }); | 459 }); |
| OLD | NEW |