| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 return ''; | 344 return ''; |
| 345 if (syncStatus.hasError) | 345 if (syncStatus.hasError) |
| 346 return 'settings:sync-problem'; | 346 return 'settings:sync-problem'; |
| 347 if (syncStatus.managed) | 347 if (syncStatus.managed) |
| 348 return 'settings:sync-disabled'; | 348 return 'settings:sync-disabled'; |
| 349 | 349 |
| 350 return 'settings:sync'; | 350 return 'settings:sync'; |
| 351 }, | 351 }, |
| 352 | 352 |
| 353 /** | 353 /** |
| 354 * @private |
| 355 * @param {boolean} hasSyncError Whether there is a sync error. |
| 356 * @return {string} The class name for the sync status text. |
| 357 */ |
| 358 getSyncStatusTextClass_: function(hasSyncError) { |
| 359 return hasSyncError ? 'sync-error' : ''; |
| 360 }, |
| 361 |
| 362 /** |
| 354 * @param {string} iconUrl | 363 * @param {string} iconUrl |
| 355 * @return {string} A CSS imageset for multiple scale factors. | 364 * @return {string} A CSS imageset for multiple scale factors. |
| 356 * @private | 365 * @private |
| 357 */ | 366 */ |
| 358 getIconImageset_: function(iconUrl) { | 367 getIconImageset_: function(iconUrl) { |
| 359 return cr.icon.getImage(iconUrl); | 368 return cr.icon.getImage(iconUrl); |
| 360 }, | 369 }, |
| 361 | 370 |
| 362 /** | 371 /** |
| 363 * @return {boolean} Whether to show the "Sign in to Chrome" button. | 372 * @return {boolean} Whether to show the "Sign in to Chrome" button. |
| 364 * @private | 373 * @private |
| 365 */ | 374 */ |
| 366 showSignin_: function(syncStatus) { | 375 showSignin_: function(syncStatus) { |
| 367 return !!syncStatus.signinAllowed && !syncStatus.signedIn; | 376 return !!syncStatus.signinAllowed && !syncStatus.signedIn; |
| 368 }, | 377 }, |
| 369 }); | 378 }); |
| OLD | NEW |