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

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

Issue 2240023002: [MD settings] extension exceptions in site settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review changes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/site_settings_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/site_settings/site_list.js
diff --git a/chrome/browser/resources/settings/site_settings/site_list.js b/chrome/browser/resources/settings/site_settings/site_list.js
index 83383b9dd3d95e98989cd903f908e6326479df53..ae60a622a90992413884d935c868b2a5d83f8dde 100644
--- a/chrome/browser/resources/settings/site_settings/site_list.js
+++ b/chrome/browser/resources/settings/site_settings/site_list.js
@@ -302,8 +302,12 @@ Polymer({
return null;
// TODO(finnur): Hmm, it would probably be better to ensure scheme on the
// JS/C++ boundary.
- return new URL(
- this.ensureUrlHasScheme(originOrPattern.replace('[*.]', '')));
+ // TODO(dschuyler): I agree. This filtering should be done in one go, rather
+ // that during the sort. The URL generation should be wrapped in a try/catch
+ // as well.
+ originOrPattern = originOrPattern.replace('*://', '');
+ originOrPattern = originOrPattern.replace('[*.]', '');
+ return new URL(this.ensureUrlHasScheme(originOrPattern));
},
/**
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/site_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698