diff options
Diffstat (limited to 'chromium/chrome/browser/resources/options/search_page.js')
-rw-r--r-- | chromium/chrome/browser/resources/options/search_page.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/chromium/chrome/browser/resources/options/search_page.js b/chromium/chrome/browser/resources/options/search_page.js index 234399d7af2..cd72ba5f383 100644 --- a/chromium/chrome/browser/resources/options/search_page.js +++ b/chromium/chrome/browser/resources/options/search_page.js @@ -272,8 +272,7 @@ cr.define('options', function() { // Set the hash on the current page, and the enclosing uber page var hash = text ? '#' + encodeURIComponent(text) : ''; var path = text ? this.name : ''; - window.location.hash = hash; - uber.invokeMethodOnParent('setPath', {path: path + hash}); + uber.pushState({}, path + hash); // Toggle the search page if necessary. if (text) { @@ -505,7 +504,7 @@ cr.define('options', function() { /** * Builds a list of sub-pages (and overlay pages) to search. Ignore pages - * that have no associated controls. + * that have no associated controls, or whose controls are hidden. * @return {Array} An array of pages to search. * @private */ @@ -513,13 +512,19 @@ cr.define('options', function() { var name, pageInfo, page, pages = []; for (name in OptionsPage.registeredPages) { page = OptionsPage.registeredPages[name]; - if (page.parentPage && page.associatedSection) + if (page.parentPage && + page.associatedSection && + !page.associatedSection.hidden) { pages.push(page); + } } for (name in OptionsPage.registeredOverlayPages) { page = OptionsPage.registeredOverlayPages[name]; - if (page.associatedSection && page.pageDiv != undefined) + if (page.associatedSection && + !page.associatedSection.hidden && + page.pageDiv != undefined) { pages.push(page); + } } return pages; }, |