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

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

Issue 2787923002: [MD settings] small code health changes (Closed)
Patch Set: Created 3 years, 8 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 (function() { 5 (function() {
6 6
7 /** 7 /**
8 * Names of the radio buttons which allow the user to choose their encryption 8 * Names of the radio buttons which allow the user to choose their encryption
9 * mechanism. 9 * mechanism.
10 * @enum {string} 10 * @enum {string}
(...skipping 17 matching lines...) Expand all
28 'themesSynced', 28 'themesSynced',
29 'bookmarksSynced', 29 'bookmarksSynced',
30 'passwordsSynced', 30 'passwordsSynced',
31 'tabsSynced', 31 'tabsSynced',
32 'paymentsIntegrationEnabled', 32 'paymentsIntegrationEnabled',
33 ]; 33 ];
34 34
35 /** 35 /**
36 * @fileoverview 36 * @fileoverview
37 * 'settings-sync-page' is the settings page containing sync settings. 37 * 'settings-sync-page' is the settings page containing sync settings.
38 *
39 * Example:
40 *
41 * <iron-animated-pages>
42 * <settings-sync-page></settings-sync-page>
43 * ... other pages ...
44 * </iron-animated-pages>
45 */ 38 */
46 Polymer({ 39 Polymer({
47 is: 'settings-sync-page', 40 is: 'settings-sync-page',
48 41
49 behaviors: [ 42 behaviors: [
50 WebUIListenerBehavior, 43 WebUIListenerBehavior,
51 settings.RouteObserverBehavior, 44 settings.RouteObserverBehavior,
52 ], 45 ],
53 46
54 properties: { 47 properties: {
55 /** @private */ 48 /** @private */
56 pages: { 49 pages_: {
57 type: Object, 50 type: Object,
58 value: settings.PageStatus, 51 value: settings.PageStatus,
59 readOnly: true, 52 readOnly: true,
60 }, 53 },
61 54
62 /** 55 /**
63 * The current page status. Defaults to |CONFIGURE| such that the searching 56 * The current page status. Defaults to |CONFIGURE| such that the searching
64 * algorithm can search useful content when the page is not visible to the 57 * algorithm can search useful content when the page is not visible to the
65 * user. 58 * user.
66 * @private {?settings.PageStatus} 59 * @private {?settings.PageStatus}
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 case settings.PageStatus.SPINNER: 341 case settings.PageStatus.SPINNER:
349 case settings.PageStatus.TIMEOUT: 342 case settings.PageStatus.TIMEOUT:
350 case settings.PageStatus.CONFIGURE: 343 case settings.PageStatus.CONFIGURE:
351 this.pageStatus_ = pageStatus; 344 this.pageStatus_ = pageStatus;
352 return; 345 return;
353 case settings.PageStatus.DONE: 346 case settings.PageStatus.DONE:
354 if (settings.getCurrentRoute() == settings.Route.SYNC) 347 if (settings.getCurrentRoute() == settings.Route.SYNC)
355 settings.navigateTo(settings.Route.PEOPLE); 348 settings.navigateTo(settings.Route.PEOPLE);
356 return; 349 return;
357 case settings.PageStatus.PASSPHRASE_FAILED: 350 case settings.PageStatus.PASSPHRASE_FAILED:
358 if (this.pageStatus_ == this.pages.CONFIGURE && 351 if (this.pageStatus_ == this.pages_.CONFIGURE &&
359 this.syncPrefs && this.syncPrefs.passphraseRequired) { 352 this.syncPrefs && this.syncPrefs.passphraseRequired) {
360 this.$$('#existingPassphraseInput').invalid = true; 353 this.$$('#existingPassphraseInput').invalid = true;
361 } 354 }
362 return; 355 return;
363 } 356 }
364 357
365 assertNotReached(); 358 assertNotReached();
366 }, 359 },
367 360
368 /** 361 /**
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 onLearnMoreTap_: function(event) { 432 onLearnMoreTap_: function(event) {
440 if (event.target.tagName == 'A') { 433 if (event.target.tagName == 'A') {
441 // Stop the propagation of events, so that clicking on links inside 434 // Stop the propagation of events, so that clicking on links inside
442 // checkboxes or radio buttons won't change the value. 435 // checkboxes or radio buttons won't change the value.
443 event.stopPropagation(); 436 event.stopPropagation();
444 } 437 }
445 } 438 }
446 }); 439 });
447 440
448 })(); 441 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698