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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 * @private | 303 * @private |
304 * @param {?settings.SyncStatus} syncStatus | 304 * @param {?settings.SyncStatus} syncStatus |
305 * @return {boolean} | 305 * @return {boolean} |
306 */ | 306 */ |
307 isAdvancedSyncSettingsVisible_: function(syncStatus) { | 307 isAdvancedSyncSettingsVisible_: function(syncStatus) { |
308 return !!syncStatus && !!syncStatus.signedIn && | 308 return !!syncStatus && !!syncStatus.signedIn && |
309 !!syncStatus.syncSystemEnabled; | 309 !!syncStatus.syncSystemEnabled; |
310 }, | 310 }, |
311 | 311 |
312 /** | 312 /** |
313 * @param {?settings.SyncStatus} syncStatus | |
314 * @return {boolean} | |
315 * @private | |
316 */ | |
317 isSyncEnabled_: function(syncStatus) { | |
318 return !(syncStatus && syncStatus.managed); | |
tommycli
2016/07/26 23:51:13
It seems that this should be:
!syncStatus || sync
tommycli
2016/07/26 23:51:41
Err.. i guess actually:
syncStatus && !syncStatus
| |
319 }, | |
320 | |
321 /** | |
313 * @private | 322 * @private |
314 * @param {?settings.SyncStatus} syncStatus | 323 * @param {?settings.SyncStatus} syncStatus |
315 * @return {string} | 324 * @return {string} |
316 */ | 325 */ |
317 getSyncIcon_: function(syncStatus) { | 326 getSyncIcon_: function(syncStatus) { |
318 if (!syncStatus) | 327 if (!syncStatus) |
319 return ''; | 328 return ''; |
320 if (syncStatus.hasError) | 329 if (syncStatus.hasError) |
321 return 'settings:sync-problem'; | 330 return 'settings:sync-problem'; |
322 if (syncStatus.managed) | 331 if (syncStatus.managed) |
323 return 'settings:sync-disabled'; | 332 return 'settings:sync-disabled'; |
324 | 333 |
325 return 'settings:done'; | 334 return 'settings:done'; |
326 }, | 335 }, |
327 }); | 336 }); |
OLD | NEW |