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

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

Issue 2021343003: MD Site Settings: Add five new top level categories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback and add icons Created 4 years, 6 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/add_site_dialog.js
diff --git a/chrome/browser/resources/settings/site_settings/add_site_dialog.js b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
index 8abb0a7b658e4e9f5549cd6369f3e45b11d2da6e..e00838e4d414cf100f3a5f76e57864c8d45abee0 100644
--- a/chrome/browser/resources/settings/site_settings/add_site_dialog.js
+++ b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
@@ -37,21 +37,6 @@ Polymer({
},
/**
- * Adds the wildcard prefix to a pattern string.
- * @param {string} pattern The pattern to add the wildcard to.
- * @return {string} The resulting pattern.
- * @private
- */
- addPatternWildcard_: function(pattern) {
- if (pattern.startsWith('http://'))
- return pattern.replace('http://', 'http://[*.]');
- else if (pattern.startsWith('https://'))
- return pattern.replace('https://', 'https://[*.]');
- else
- return '[*.]' + pattern;
- },
-
- /**
* The tap handler for the Add [Site] button (adds the pattern and closes
* the dialog).
* @private
@@ -59,7 +44,7 @@ Polymer({
onAddTap_: function() {
var pattern = this.addPatternWildcard_(this.site_);
this.setCategoryPermissionForOrigin(
- pattern, pattern, this.category, settings.PermissionValues.ALLOW);
+ pattern, '', this.category, settings.PermissionValues.ALLOW);
this.$.dialog.close();
},
});

Powered by Google App Engine
This is Rietveld 408576698