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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_list.js

Issue 2156413002: Settings Router Refactor: Migrate to settings.Route.navigateTo calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use timing fix 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 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given 7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given
8 * category. 8 * category.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 this.categorySubtype != settings.PermissionValues.SESSION_ONLY && 375 this.categorySubtype != settings.PermissionValues.SESSION_ONLY &&
376 this.category == settings.ContentSettingsTypes.COOKIES; 376 this.category == settings.ContentSettingsTypes.COOKIES;
377 }, 377 },
378 378
379 /** 379 /**
380 * A handler for selecting a site (by clicking on the origin). 380 * A handler for selecting a site (by clicking on the origin).
381 * @private 381 * @private
382 */ 382 */
383 onOriginTap_: function(event) { 383 onOriginTap_: function(event) {
384 this.selectedSite = event.model.item; 384 this.selectedSite = event.model.item;
385 var categorySelected = 385 if (this.allSites)
386 this.allSites ? 386 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL_DETAILS);
387 'all-sites' : 387 else
388 'site-settings-category-' + this.computeCategoryTextId(this.category); 388 settings.navigateTo(this.computeCategoryDetailsRoute(this.category));
389 this.currentRoute = {
390 page: this.currentRoute.page,
391 section: 'privacy',
392 subpage: ['site-settings', categorySelected, 'site-details'],
393 };
394 }, 389 },
395 390
396 /** 391 /**
397 * A handler for activating one of the menu action items. 392 * A handler for activating one of the menu action items.
398 * @param {!{model: !{item: !{origin: string}}, 393 * @param {!{model: !{item: !{origin: string}},
399 * detail: !{selected: string}}} event 394 * detail: !{selected: string}}} event
400 * @private 395 * @private
401 */ 396 */
402 onActionMenuIronActivate_: function(event) { 397 onActionMenuIronActivate_: function(event) {
403 var origin = event.model.item.origin; 398 var origin = event.model.item.origin;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 // is redundant to also list all the sites that are blocked. 459 // is redundant to also list all the sites that are blocked.
465 if (this.isAllowList_()) 460 if (this.isAllowList_())
466 return true; 461 return true;
467 462
468 if (this.isSessionOnlyList_()) 463 if (this.isSessionOnlyList_())
469 return siteList.length > 0; 464 return siteList.length > 0;
470 465
471 return toggleState; 466 return toggleState;
472 }, 467 },
473 }); 468 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698