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

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

Issue 2741343010: MD Settings: Prevent direct navigation to disabled Site Settings UI. (Closed)
Patch Set: Fix more tests. Created 3 years, 9 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 cr.define('settings', function() { 5 cr.define('settings', function() {
6 /** 6 /**
7 * Class for navigable routes. May only be instantiated within this file. 7 * Class for navigable routes. May only be instantiated within this file.
8 * @constructor 8 * @constructor
9 * @param {string} path 9 * @param {string} path
10 * @private 10 * @private
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 r.STYLUS = r.DEVICE.createChild('/stylus'); 141 r.STYLUS = r.DEVICE.createChild('/stylus');
142 r.DISPLAY = r.DEVICE.createChild('/display'); 142 r.DISPLAY = r.DEVICE.createChild('/display');
143 r.STORAGE = r.DEVICE.createChild('/storage'); 143 r.STORAGE = r.DEVICE.createChild('/storage');
144 r.POWER = r.DEVICE.createChild('/power'); 144 r.POWER = r.DEVICE.createChild('/power');
145 // </if> 145 // </if>
146 146
147 r.PRIVACY = r.ADVANCED.createSection('/privacy', 'privacy'); 147 r.PRIVACY = r.ADVANCED.createSection('/privacy', 'privacy');
148 r.CERTIFICATES = r.PRIVACY.createChild('/certificates'); 148 r.CERTIFICATES = r.PRIVACY.createChild('/certificates');
149 149
150 r.SITE_SETTINGS = r.PRIVACY.createChild('/content'); 150 r.SITE_SETTINGS = r.PRIVACY.createChild('/content');
151 r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all'); 151
152 r.SITE_SETTINGS_SITE_DETAILS = 152 if (loadTimeData.getBoolean('enableSiteSettings')) {
153 r.SITE_SETTINGS_ALL.createChild('/content/siteDetails'); 153 r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all');
154 r.SITE_SETTINGS_SITE_DETAILS =
155 r.SITE_SETTINGS_ALL.createChild('/content/siteDetails');
156 }
154 157
155 r.SITE_SETTINGS_HANDLERS = r.SITE_SETTINGS.createChild('/handlers'); 158 r.SITE_SETTINGS_HANDLERS = r.SITE_SETTINGS.createChild('/handlers');
156 159
157 // TODO(tommycli): Find a way to refactor these repetitive category routes. 160 // TODO(tommycli): Find a way to refactor these repetitive category routes.
158 r.SITE_SETTINGS_AUTOMATIC_DOWNLOADS = 161 r.SITE_SETTINGS_AUTOMATIC_DOWNLOADS =
159 r.SITE_SETTINGS.createChild('automaticDownloads'); 162 r.SITE_SETTINGS.createChild('automaticDownloads');
160 r.SITE_SETTINGS_BACKGROUND_SYNC = 163 r.SITE_SETTINGS_BACKGROUND_SYNC =
161 r.SITE_SETTINGS.createChild('backgroundSync'); 164 r.SITE_SETTINGS.createChild('backgroundSync');
162 r.SITE_SETTINGS_CAMERA = r.SITE_SETTINGS.createChild('camera'); 165 r.SITE_SETTINGS_CAMERA = r.SITE_SETTINGS.createChild('camera');
163 r.SITE_SETTINGS_COOKIES = r.SITE_SETTINGS.createChild('cookies'); 166 r.SITE_SETTINGS_COOKIES = r.SITE_SETTINGS.createChild('cookies');
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 getRouteForPath: getRouteForPath, 403 getRouteForPath: getRouteForPath,
401 initializeRouteFromUrl: initializeRouteFromUrl, 404 initializeRouteFromUrl: initializeRouteFromUrl,
402 resetRouteForTesting: resetRouteForTesting, 405 resetRouteForTesting: resetRouteForTesting,
403 getCurrentRoute: getCurrentRoute, 406 getCurrentRoute: getCurrentRoute,
404 getQueryParameters: getQueryParameters, 407 getQueryParameters: getQueryParameters,
405 lastRouteChangeWasPopstate: lastRouteChangeWasPopstate, 408 lastRouteChangeWasPopstate: lastRouteChangeWasPopstate,
406 navigateTo: navigateTo, 409 navigateTo: navigateTo,
407 navigateToPreviousRoute: navigateToPreviousRoute, 410 navigateToPreviousRoute: navigateToPreviousRoute,
408 }; 411 };
409 }); 412 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/route.html ('k') | chrome/test/data/webui/settings/cr_settings_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698