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

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

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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',
11 11
12 behaviors: [ 12 behaviors: [
13 settings.RouteObserverBehavior, 13 settings.RouteObserverBehavior, I18nBehavior, WebUIListenerBehavior,
14 I18nBehavior, 14 /* <if expr="chromeos"> */
15 WebUIListenerBehavior,
16 <if expr="chromeos">
17 LockStateBehavior, 15 LockStateBehavior,
18 </if> 16 /* </if> */
19 ], 17 ],
20 18
21 properties: { 19 properties: {
22 /** 20 /**
23 * Preferences state. 21 * Preferences state.
24 */ 22 */
25 prefs: { 23 prefs: {
26 type: Object, 24 type: Object,
27 notify: true, 25 notify: true,
28 }, 26 },
(...skipping 29 matching lines...) Expand all
58 /** 56 /**
59 * True if the profile deletion warning is visible. 57 * True if the profile deletion warning is visible.
60 */ 58 */
61 deleteProfileWarningVisible_: Boolean, 59 deleteProfileWarningVisible_: Boolean,
62 60
63 /** 61 /**
64 * True if the checkbox to delete the profile has been checked. 62 * True if the checkbox to delete the profile has been checked.
65 */ 63 */
66 deleteProfile_: Boolean, 64 deleteProfile_: Boolean,
67 65
68 <if expr="not chromeos"> 66 /* <if expr="not chromeos"> */
69 /** @private */ 67 /** @private */
70 showImportDataDialog_: { 68 showImportDataDialog_: {
71 type: Boolean, 69 type: Boolean,
72 value: false, 70 value: false,
73 }, 71 },
74 </if> 72 /* </if> */
75 73
76 /** @private {!settings.SyncBrowserProxy} */ 74 /** @private {!settings.SyncBrowserProxy} */
77 syncBrowserProxy_: { 75 syncBrowserProxy_: {
78 type: Object, 76 type: Object,
79 value: function() { 77 value: function() {
80 return settings.SyncBrowserProxyImpl.getInstance(); 78 return settings.SyncBrowserProxyImpl.getInstance();
81 }, 79 },
82 }, 80 },
83 81
84 <if expr="chromeos"> 82 /* <if expr="chromeos"> */
85 /** 83 /**
86 * True if quick unlock settings should be displayed on this machine. 84 * True if quick unlock settings should be displayed on this machine.
87 * @private 85 * @private
88 */ 86 */
89 quickUnlockEnabled_: { 87 quickUnlockEnabled_: {
90 type: Boolean, 88 type: Boolean,
91 value: function() { 89 value: function() {
92 return loadTimeData.getBoolean('pinUnlockEnabled'); 90 return loadTimeData.getBoolean('pinUnlockEnabled');
93 }, 91 },
94 readOnly: true, 92 readOnly: true,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 loadTimeData.getBoolean('easyUnlockProximityDetectionAllowed'); 131 loadTimeData.getBoolean('easyUnlockProximityDetectionAllowed');
134 }, 132 },
135 readOnly: true, 133 readOnly: true,
136 }, 134 },
137 135
138 /** @private */ 136 /** @private */
139 showEasyUnlockTurnOffDialog_: { 137 showEasyUnlockTurnOffDialog_: {
140 type: Boolean, 138 type: Boolean,
141 value: false, 139 value: false,
142 }, 140 },
143 </if> 141 /* </if> */
144 }, 142 },
145 143
146 /** @override */ 144 /** @override */
147 attached: function() { 145 attached: function() {
148 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance(); 146 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance();
149 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this)); 147 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this));
150 this.addWebUIListener('profile-info-changed', 148 this.addWebUIListener(
151 this.handleProfileInfo_.bind(this)); 149 'profile-info-changed', this.handleProfileInfo_.bind(this));
152 150
153 profileInfoProxy.getProfileManagesSupervisedUsers().then( 151 profileInfoProxy.getProfileManagesSupervisedUsers().then(
154 this.handleProfileManagesSupervisedUsers_.bind(this)); 152 this.handleProfileManagesSupervisedUsers_.bind(this));
155 this.addWebUIListener('profile-manages-supervised-users-changed', 153 this.addWebUIListener(
156 this.handleProfileManagesSupervisedUsers_.bind(this)); 154 'profile-manages-supervised-users-changed',
155 this.handleProfileManagesSupervisedUsers_.bind(this));
157 156
158 this.addWebUIListener('profile-stats-count-ready', 157 this.addWebUIListener(
159 this.handleProfileStatsCount_.bind(this)); 158 'profile-stats-count-ready', this.handleProfileStatsCount_.bind(this));
160 159
161 this.syncBrowserProxy_.getSyncStatus().then( 160 this.syncBrowserProxy_.getSyncStatus().then(
162 this.handleSyncStatus_.bind(this)); 161 this.handleSyncStatus_.bind(this));
163 this.addWebUIListener('sync-status-changed', 162 this.addWebUIListener(
164 this.handleSyncStatus_.bind(this)); 163 'sync-status-changed', this.handleSyncStatus_.bind(this));
165 164
166 <if expr="chromeos"> 165 /* <if expr="chromeos"> */
167 if (this.easyUnlockAllowed_) { 166 if (this.easyUnlockAllowed_) {
168 this.addWebUIListener( 167 this.addWebUIListener(
169 'easy-unlock-enabled-status', 168 'easy-unlock-enabled-status',
170 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); 169 this.handleEasyUnlockEnabledStatusChanged_.bind(this));
171 this.easyUnlockBrowserProxy_.getEnabledStatus().then( 170 this.easyUnlockBrowserProxy_.getEnabledStatus().then(
172 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); 171 this.handleEasyUnlockEnabledStatusChanged_.bind(this));
173 } 172 }
174 </if> 173 /* </if> */
175 }, 174 },
176 175
177 /** @protected */ 176 /** @protected */
178 currentRouteChanged: function() { 177 currentRouteChanged: function() {
179 this.showImportDataDialog_ = 178 this.showImportDataDialog_ =
180 settings.getCurrentRoute() == settings.Route.IMPORT_DATA; 179 settings.getCurrentRoute() == settings.Route.IMPORT_DATA;
181 180
182 if (settings.getCurrentRoute() == settings.Route.SIGN_OUT) { 181 if (settings.getCurrentRoute() == settings.Route.SIGN_OUT) {
183 // Request the latest profile stats count, but don't wait for it. 182 // Request the latest profile stats count, but don't wait for it.
184 settings.ProfileInfoBrowserProxyImpl.getInstance().getProfileStatsCount(); 183 settings.ProfileInfoBrowserProxyImpl.getInstance().getProfileStatsCount();
185 184
186 // If the sync status has not been fetched yet, optimistically display 185 // If the sync status has not been fetched yet, optimistically display
187 // the disconnect dialog. There is another check when the sync status is 186 // the disconnect dialog. There is another check when the sync status is
188 // fetched. The dialog will be closed then the user is not signed in. 187 // fetched. The dialog will be closed then the user is not signed in.
189 if (this.syncStatus && !this.syncStatus.signedIn) 188 if (this.syncStatus && !this.syncStatus.signedIn)
190 settings.navigateToPreviousRoute(); 189 settings.navigateToPreviousRoute();
191 else 190 else
192 this.$.disconnectDialog.showModal(); 191 this.$.disconnectDialog.showModal();
193 } else if (this.$.disconnectDialog.open) { 192 } else if (this.$.disconnectDialog.open) {
194 this.$.disconnectDialog.close(); 193 this.$.disconnectDialog.close();
195 } 194 }
196 }, 195 },
197 196
198 <if expr="chromeos"> 197 /* <if expr="chromeos"> */
199 /** @private */ 198 /** @private */
200 getPasswordState_: function(hasPin, enableScreenLock) { 199 getPasswordState_: function(hasPin, enableScreenLock) {
201 if (!enableScreenLock) 200 if (!enableScreenLock)
202 return this.i18n('lockScreenNone'); 201 return this.i18n('lockScreenNone');
203 if (hasPin) 202 if (hasPin)
204 return this.i18n('lockScreenPinOrPassword'); 203 return this.i18n('lockScreenPinOrPassword');
205 return this.i18n('lockScreenPasswordOnly'); 204 return this.i18n('lockScreenPasswordOnly');
206 }, 205 },
207 </if> 206 /* </if> */
208 207
209 /** 208 /**
210 * Handler for when the profile's icon and name is updated. 209 * Handler for when the profile's icon and name is updated.
211 * @private 210 * @private
212 * @param {!settings.ProfileInfo} info 211 * @param {!settings.ProfileInfo} info
213 */ 212 */
214 handleProfileInfo_: function(info) { 213 handleProfileInfo_: function(info) {
215 this.profileName_ = info.name; 214 this.profileName_ = info.name;
216 this.profileIconUrl_ = info.iconUrl; 215 this.profileIconUrl_ = info.iconUrl;
217 }, 216 },
218 217
219 /** 218 /**
220 * Handler for when the profile starts or stops managing supervised users. 219 * Handler for when the profile starts or stops managing supervised users.
221 * @private 220 * @private
222 * @param {boolean} managesSupervisedUsers 221 * @param {boolean} managesSupervisedUsers
223 */ 222 */
224 handleProfileManagesSupervisedUsers_: function(managesSupervisedUsers) { 223 handleProfileManagesSupervisedUsers_: function(managesSupervisedUsers) {
225 this.profileManagesSupervisedUsers_ = managesSupervisedUsers; 224 this.profileManagesSupervisedUsers_ = managesSupervisedUsers;
226 }, 225 },
227 226
228 /** 227 /**
229 * Handler for when the profile stats count is pushed from the browser. 228 * Handler for when the profile stats count is pushed from the browser.
230 * @param {number} count 229 * @param {number} count
231 * @private 230 * @private
232 */ 231 */
233 handleProfileStatsCount_: function(count) { 232 handleProfileStatsCount_: function(count) {
234 this.deleteProfileWarning_ = (count > 0) ? 233 this.deleteProfileWarning_ = (count > 0) ?
235 (count == 1) ? 234 (count == 1) ?
236 loadTimeData.getStringF('deleteProfileWarningWithCountsSingular', 235 loadTimeData.getStringF(
237 this.syncStatus.signedInUsername) : 236 'deleteProfileWarningWithCountsSingular',
238 loadTimeData.getStringF('deleteProfileWarningWithCountsPlural', 237 this.syncStatus.signedInUsername) :
239 count, this.syncStatus.signedInUsername) : 238 loadTimeData.getStringF(
240 loadTimeData.getStringF('deleteProfileWarningWithoutCounts', 239 'deleteProfileWarningWithCountsPlural', count,
241 this.syncStatus.signedInUsername); 240 this.syncStatus.signedInUsername) :
241 loadTimeData.getStringF(
242 'deleteProfileWarningWithoutCounts',
243 this.syncStatus.signedInUsername);
242 }, 244 },
243 245
244 /** 246 /**
245 * Handler for when the sync state is pushed from the browser. 247 * Handler for when the sync state is pushed from the browser.
246 * @param {?settings.SyncStatus} syncStatus 248 * @param {?settings.SyncStatus} syncStatus
247 * @private 249 * @private
248 */ 250 */
249 handleSyncStatus_: function(syncStatus) { 251 handleSyncStatus_: function(syncStatus) {
250 if (!this.syncStatus && syncStatus && !syncStatus.signedIn) 252 if (!this.syncStatus && syncStatus && !syncStatus.signedIn)
251 chrome.metricsPrivate.recordUserAction('Signin_Impression_FromSettings'); 253 chrome.metricsPrivate.recordUserAction('Signin_Impression_FromSettings');
252 254
253 if (!syncStatus.signedIn && this.$.disconnectDialog.open) 255 if (!syncStatus.signedIn && this.$.disconnectDialog.open)
254 this.$.disconnectDialog.close(); 256 this.$.disconnectDialog.close();
255 257
256 this.syncStatus = syncStatus; 258 this.syncStatus = syncStatus;
257 }, 259 },
258 260
259 <if expr="chromeos"> 261 /* <if expr="chromeos"> */
260 /** 262 /**
261 * Handler for when the Easy Unlock enabled status has changed. 263 * Handler for when the Easy Unlock enabled status has changed.
262 * @private 264 * @private
263 */ 265 */
264 handleEasyUnlockEnabledStatusChanged_: function(easyUnlockEnabled) { 266 handleEasyUnlockEnabledStatusChanged_: function(easyUnlockEnabled) {
265 this.easyUnlockEnabled_ = easyUnlockEnabled; 267 this.easyUnlockEnabled_ = easyUnlockEnabled;
266 this.showEasyUnlockTurnOffDialog_ = 268 this.showEasyUnlockTurnOffDialog_ =
267 easyUnlockEnabled && this.showEasyUnlockTurnOffDialog_; 269 easyUnlockEnabled && this.showEasyUnlockTurnOffDialog_;
268 }, 270 },
269 </if> 271 /* </if> */
270 272
271 /** @private */ 273 /** @private */
272 onPictureTap_: function() { 274 onPictureTap_: function() {
273 <if expr="chromeos"> 275 /* <if expr="chromeos"> */
274 settings.navigateTo(settings.Route.CHANGE_PICTURE); 276 settings.navigateTo(settings.Route.CHANGE_PICTURE);
275 </if> 277 /* </if> */
276 <if expr="not chromeos"> 278 /* <if expr="not chromeos"> */
277 settings.navigateTo(settings.Route.MANAGE_PROFILE); 279 settings.navigateTo(settings.Route.MANAGE_PROFILE);
278 </if> 280 /* </if> */
279 }, 281 },
280 282
281 <if expr="not chromeos"> 283 /* <if expr="not chromeos"> */
282 /** @private */ 284 /** @private */
283 onProfileNameTap_: function() { 285 onProfileNameTap_: function() {
284 settings.navigateTo(settings.Route.MANAGE_PROFILE); 286 settings.navigateTo(settings.Route.MANAGE_PROFILE);
285 }, 287 },
286 </if> 288 /* </if> */
287 289
288 /** @private */ 290 /** @private */
289 onActivityControlsTap_: function() { 291 onActivityControlsTap_: function() {
290 this.syncBrowserProxy_.openActivityControlsUrl(); 292 this.syncBrowserProxy_.openActivityControlsUrl();
291 }, 293 },
292 294
293 /** @private */ 295 /** @private */
294 onSigninTap_: function() { 296 onSigninTap_: function() {
295 this.syncBrowserProxy_.startSignIn(); 297 this.syncBrowserProxy_.startSignIn();
296 }, 298 },
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 assert(this.syncStatus.syncSystemEnabled); 336 assert(this.syncStatus.syncSystemEnabled);
335 337
336 if (!this.isSyncStatusActionable_(this.syncStatus)) 338 if (!this.isSyncStatusActionable_(this.syncStatus))
337 return; 339 return;
338 340
339 switch (this.syncStatus.statusAction) { 341 switch (this.syncStatus.statusAction) {
340 case settings.StatusAction.REAUTHENTICATE: 342 case settings.StatusAction.REAUTHENTICATE:
341 this.syncBrowserProxy_.startSignIn(); 343 this.syncBrowserProxy_.startSignIn();
342 break; 344 break;
343 case settings.StatusAction.SIGNOUT_AND_SIGNIN: 345 case settings.StatusAction.SIGNOUT_AND_SIGNIN:
344 <if expr="chromeos"> 346 /* <if expr="chromeos"> */
345 this.syncBrowserProxy_.attemptUserExit(); 347 this.syncBrowserProxy_.attemptUserExit();
346 </if> 348 /* </if> */
347 <if expr="not chromeos"> 349 /* <if expr="not chromeos"> */
348 if (this.syncStatus.domain) 350 if (this.syncStatus.domain)
349 settings.navigateTo(settings.Route.SIGN_OUT); 351 settings.navigateTo(settings.Route.SIGN_OUT);
350 else { 352 else {
351 // Silently sign the user out without deleting their profile and 353 // Silently sign the user out without deleting their profile and
352 // prompt them to sign back in. 354 // prompt them to sign back in.
353 this.syncBrowserProxy_.signOut(false); 355 this.syncBrowserProxy_.signOut(false);
354 this.syncBrowserProxy_.startSignIn(); 356 this.syncBrowserProxy_.startSignIn();
355 } 357 }
356 </if> 358 /* </if> */
357 break; 359 break;
358 case settings.StatusAction.UPGRADE_CLIENT: 360 case settings.StatusAction.UPGRADE_CLIENT:
359 settings.navigateTo(settings.Route.ABOUT); 361 settings.navigateTo(settings.Route.ABOUT);
360 break; 362 break;
361 case settings.StatusAction.ENTER_PASSPHRASE: 363 case settings.StatusAction.ENTER_PASSPHRASE:
362 case settings.StatusAction.NO_ACTION: 364 case settings.StatusAction.NO_ACTION:
363 default: 365 default:
364 settings.navigateTo(settings.Route.SYNC); 366 settings.navigateTo(settings.Route.SYNC);
365 } 367 }
366 }, 368 },
367 369
368 <if expr="chromeos"> 370 /* <if expr="chromeos"> */
369 /** @private */ 371 /** @private */
370 onConfigureLockTap_: function() { 372 onConfigureLockTap_: function() {
371 settings.navigateTo(settings.Route.LOCK_SCREEN); 373 settings.navigateTo(settings.Route.LOCK_SCREEN);
372 }, 374 },
373 375
374 /** @private */ 376 /** @private */
375 onEasyUnlockSetupTap_: function() { 377 onEasyUnlockSetupTap_: function() {
376 this.easyUnlockBrowserProxy_.startTurnOnFlow(); 378 this.easyUnlockBrowserProxy_.startTurnOnFlow();
377 }, 379 },
378 380
379 /** 381 /**
380 * @param {!Event} e 382 * @param {!Event} e
381 * @private 383 * @private
382 */ 384 */
383 onEasyUnlockTurnOffTap_: function(e) { 385 onEasyUnlockTurnOffTap_: function(e) {
384 e.preventDefault(); 386 e.preventDefault();
385 this.showEasyUnlockTurnOffDialog_ = true; 387 this.showEasyUnlockTurnOffDialog_ = true;
386 }, 388 },
387 389
388 /** @private */ 390 /** @private */
389 onEasyUnlockTurnOffDialogClose_: function() { 391 onEasyUnlockTurnOffDialogClose_: function() {
390 this.showEasyUnlockTurnOffDialog_ = false; 392 this.showEasyUnlockTurnOffDialog_ = false;
391 }, 393 },
392 </if> 394 /* </if> */
393 395
394 /** @private */ 396 /** @private */
395 onManageOtherPeople_: function() { 397 onManageOtherPeople_: function() {
396 <if expr="not chromeos"> 398 /* <if expr="not chromeos"> */
397 this.syncBrowserProxy_.manageOtherPeople(); 399 this.syncBrowserProxy_.manageOtherPeople();
398 </if> 400 /* </if> */
399 <if expr="chromeos"> 401 /* <if expr="chromeos"> */
400 settings.navigateTo(settings.Route.ACCOUNTS); 402 settings.navigateTo(settings.Route.ACCOUNTS);
401 </if> 403 /* </if> */
402 }, 404 },
403 405
404 /** @private */ 406 /** @private */
405 onManageSupervisedUsers_: function() { 407 onManageSupervisedUsers_: function() {
406 window.open(loadTimeData.getString('supervisedUsersUrl')); 408 window.open(loadTimeData.getString('supervisedUsersUrl'));
407 }, 409 },
408 410
409 <if expr="not chromeos"> 411 /* <if expr="not chromeos"> */
410 /** 412 /**
411 * @private 413 * @private
412 * @param {string} domain 414 * @param {string} domain
413 * @return {string} 415 * @return {string}
414 */ 416 */
415 getDomainHtml_: function(domain) { 417 getDomainHtml_: function(domain) {
416 var innerSpan = 418 var innerSpan = '<span id="managed-by-domain-name">' + domain + '</span>';
417 '<span id="managed-by-domain-name">' + domain + '</span>';
418 return loadTimeData.getStringF('domainManagedProfile', innerSpan); 419 return loadTimeData.getStringF('domainManagedProfile', innerSpan);
419 }, 420 },
420 421
421 /** @private */ 422 /** @private */
422 onImportDataTap_: function() { 423 onImportDataTap_: function() {
423 settings.navigateTo(settings.Route.IMPORT_DATA); 424 settings.navigateTo(settings.Route.IMPORT_DATA);
424 }, 425 },
425 426
426 /** @private */ 427 /** @private */
427 onImportDataDialogClosed_: function() { 428 onImportDataDialogClosed_: function() {
428 settings.navigateToPreviousRoute(); 429 settings.navigateToPreviousRoute();
429 }, 430 },
430 </if> 431 /* </if> */
431 432
432 /** 433 /**
433 * @private 434 * @private
434 * @param {string} domain 435 * @param {string} domain
435 * @return {string} 436 * @return {string}
436 */ 437 */
437 getDisconnectExplanationHtml_: function(domain) { 438 getDisconnectExplanationHtml_: function(domain) {
438 <if expr="not chromeos"> 439 /* <if expr="not chromeos"> */
439 if (domain) { 440 if (domain) {
440 return loadTimeData.getStringF( 441 return loadTimeData.getStringF(
441 'syncDisconnectManagedProfileExplanation', 442 'syncDisconnectManagedProfileExplanation',
442 '<span id="managed-by-domain-name">' + domain + '</span>'); 443 '<span id="managed-by-domain-name">' + domain + '</span>');
443 } 444 }
444 </if> 445 /* </if> */
445 return loadTimeData.getString('syncDisconnectExplanation'); 446 return loadTimeData.getString('syncDisconnectExplanation');
446 }, 447 },
447 448
448 /** 449 /**
449 * @private 450 * @private
450 * @param {?settings.SyncStatus} syncStatus 451 * @param {?settings.SyncStatus} syncStatus
451 * @return {boolean} 452 * @return {boolean}
452 */ 453 */
453 isAdvancedSyncSettingsVisible_: function(syncStatus) { 454 isAdvancedSyncSettingsVisible_: function(syncStatus) {
454 return !!syncStatus && !!syncStatus.signedIn && 455 return !!syncStatus && !!syncStatus.signedIn &&
455 !!syncStatus.syncSystemEnabled; 456 !!syncStatus.syncSystemEnabled;
456 }, 457 },
457 458
458 /** 459 /**
459 * @private 460 * @private
460 * @param {?settings.SyncStatus} syncStatus 461 * @param {?settings.SyncStatus} syncStatus
461 * @return {boolean} Whether an action can be taken with the sync status. sync 462 * @return {boolean} Whether an action can be taken with the sync status. sync
462 * status is actionable if sync is not managed and if there is a sync 463 * status is actionable if sync is not managed and if there is a sync
463 * error, there is an action associated with it. 464 * error, there is an action associated with it.
464 */ 465 */
465 isSyncStatusActionable_: function(syncStatus) { 466 isSyncStatusActionable_: function(syncStatus) {
466 return !!syncStatus && !syncStatus.managed && (!syncStatus.hasError || 467 return !!syncStatus && !syncStatus.managed &&
467 syncStatus.statusAction != settings.StatusAction.NO_ACTION); 468 (!syncStatus.hasError ||
469 syncStatus.statusAction != settings.StatusAction.NO_ACTION);
468 }, 470 },
469 471
470 /** 472 /**
471 * @private 473 * @private
472 * @param {?settings.SyncStatus} syncStatus 474 * @param {?settings.SyncStatus} syncStatus
473 * @return {string} 475 * @return {string}
474 */ 476 */
475 getSyncIcon_: function(syncStatus) { 477 getSyncIcon_: function(syncStatus) {
476 if (!syncStatus) 478 if (!syncStatus)
477 return ''; 479 return '';
(...skipping 30 matching lines...) Expand all
508 510
509 /** 511 /**
510 * @param {!settings.SyncStatus} syncStatus 512 * @param {!settings.SyncStatus} syncStatus
511 * @return {boolean} Whether to show the "Sign in to Chrome" button. 513 * @return {boolean} Whether to show the "Sign in to Chrome" button.
512 * @private 514 * @private
513 */ 515 */
514 showSignin_: function(syncStatus) { 516 showSignin_: function(syncStatus) {
515 return !!syncStatus.signinAllowed && !syncStatus.signedIn; 517 return !!syncStatus.signinAllowed && !syncStatus.signedIn;
516 }, 518 },
517 }); 519 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698