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

Side by Side Diff: chrome/browser/resources/settings/settings_page/settings_subpage.js

Issue 2249873003: Settings: Fix Site Details subpage routing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment typo Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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-subpage' shows a subpage beneath a subheader. The header contains 7 * 'settings-subpage' shows a subpage beneath a subheader. The header contains
8 * the subpage title and a back icon. 8 * the subpage title and a back icon.
9 */ 9 */
10 10
(...skipping 30 matching lines...) Expand all
41 }, 41 },
42 }, 42 },
43 43
44 /** @private */ 44 /** @private */
45 onTapBack_: function() { 45 onTapBack_: function() {
46 var previousRoute = 46 var previousRoute =
47 window.history.state && 47 window.history.state &&
48 assert(settings.getRouteForPath( 48 assert(settings.getRouteForPath(
49 /** @type {string} */ (window.history.state))); 49 /** @type {string} */ (window.history.state)));
50 50
51 if (previousRoute && previousRoute.contains(settings.getCurrentRoute())) 51 if (previousRoute)
52 window.history.back(); 52 window.history.back();
53 else 53 else
54 settings.navigateTo(assert(settings.getCurrentRoute().parent)); 54 settings.navigateTo(assert(settings.getCurrentRoute().parent));
55 }, 55 },
56 56
57 /** @private */ 57 /** @private */
58 onSearchChanged_: function(e) { 58 onSearchChanged_: function(e) {
59 this.searchTerm = e.detail; 59 this.searchTerm = e.detail;
60 }, 60 },
61 }); 61 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698