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

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

Issue 2269963003: Site Settings Desktop: Fix bug with deleting manually added exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 3 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 * 'site-details' show the details (permissions and usage) for a given origin 7 * 'site-details' show the details (permissions and usage) for a given origin
8 * under Site Settings. 8 * under Site Settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 this.onClearStorage_(); 82 this.onClearStorage_();
83 else 83 else
84 this.navigateBackIfNoData_(); 84 this.navigateBackIfNoData_();
85 }, 85 },
86 86
87 /** 87 /**
88 * Navigate back if the UI is empty (everything been cleared). 88 * Navigate back if the UI is empty (everything been cleared).
89 */ 89 */
90 navigateBackIfNoData_: function() { 90 navigateBackIfNoData_: function() {
91 if (this.storedData_ == '' && !this.permissionShowing_()) 91 if (this.storedData_ == '' && !this.permissionShowing_())
92 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); 92 settings.navigateToPreviousRoute();
93 }, 93 },
94 94
95 /** 95 /**
96 * Returns true if one or more permission is showing. 96 * Returns true if one or more permission is showing.
97 */ 97 */
98 permissionShowing_: function() { 98 permissionShowing_: function() {
99 return Array.prototype.some.call( 99 return Array.prototype.some.call(
100 this.root.querySelectorAll('site-details-permission'), 100 this.root.querySelectorAll('site-details-permission'),
101 function(element) { return element.offsetHeight > 0; }); 101 function(element) { return element.offsetHeight > 0; });
102 }, 102 },
103 }); 103 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698