Chromium Code Reviews| Index: chrome/browser/resources/settings/settings_main/settings_main.js |
| diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js |
| index 27a07401995eb905a2e33c392078ebbdb7222b34..e9b11bd5bb67a87a0b0079644eb9fa8ca2a0de9a 100644 |
| --- a/chrome/browser/resources/settings/settings_main/settings_main.js |
| +++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
| @@ -92,7 +92,7 @@ Polymer({ |
| attached: function() { |
| document.addEventListener('toggle-advanced-page', function(e) { |
| this.advancedToggleExpanded_ = e.detail; |
| - this.currentRouteChanged(settings.getCurrentRoute()); |
| + this.updatePagesShown_(); |
| }.bind(this)); |
| var currentRoute = settings.getCurrentRoute(); |
| @@ -152,6 +152,9 @@ Polymer({ |
| if (!newRoute.isSubpage()) |
| this.hasExpandedSection_ = false; |
| + if (settings.Route.ADVANCED.contains(newRoute)) |
| + this.advancedToggleExpanded_ = true; |
| + |
| this.updatePagesShown_(); |
| }, |
| @@ -177,15 +180,10 @@ Polymer({ |
| about: false, |
| basic: settings.Route.BASIC.contains(currentRoute) || |
| !this.hasExpandedSection_, |
| - advanced: settings.Route.ADVANCED.contains(currentRoute) || |
| - (!this.hasExpandedSection_ && this.advancedToggleExpanded_), |
| + advanced: this.hasExpandedSection_ ? |
| + settings.Route.ADVANCED.contains(currentRoute) : |
| + this.advancedToggleExpanded_, |
|
dschuyler
2016/09/14 00:11:02
nit: the indent looks incorrect. Is it indented fr
tommycli
2016/09/14 00:12:22
Done.
|
| }; |
| - |
| - if (this.showPages_.advanced) { |
| - assert(!this.pageVisibility || |
| - this.pageVisibility.advancedSettings !== false); |
| - this.advancedToggleExpanded_ = true; |
| - } |
| } |
| // Wait for any other changes prior to calculating the overflow padding. |