Chromium Code Reviews| 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. |
|
Finnur
2016/08/12 15:36:39
Sounds good.
On a related note:
https://bugs.chro
dschuyler
2016/08/12 19:21:13
Acknowledged.
|
| + originOrPattern = originOrPattern.replace('*://', ''); |
| + originOrPattern = originOrPattern.replace('[*.]', ''); |
| + return new URL(this.ensureUrlHasScheme(originOrPattern)); |
| }, |
| /** |