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

Unified Diff: chrome/browser/resources/settings/site_settings/site_details.js

Issue 1867363003: Better support for patterns. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/site_details.js
diff --git a/chrome/browser/resources/settings/site_settings/site_details.js b/chrome/browser/resources/settings/site_settings/site_details.js
index 5fa776485ed86eac49a466700370614bcf118562..980dc6e3b24b5734ba380a853e4dd9dc03697232 100644
--- a/chrome/browser/resources/settings/site_settings/site_details.js
+++ b/chrome/browser/resources/settings/site_settings/site_details.js
@@ -48,7 +48,8 @@ Polymer({
* Handler for when the origin changes.
*/
onSiteChanged_: function() {
- var url = new URL(this.site.origin);
+ // Using originForDisplay avoids the [*.] prefix that some exceptions use.
+ var url = new URL(this.ensureUrlHasScheme(this.site.originForDisplay));
this.$.usageApi.fetchUsageTotal(url.hostname);
},

Powered by Google App Engine
This is Rietveld 408576698