| Index: chrome/browser/resources/settings/site_settings/site_details_permission.js
|
| diff --git a/chrome/browser/resources/settings/site_settings/site_details_permission.js b/chrome/browser/resources/settings/site_settings/site_details_permission.js
|
| index 7ac2f6f59281401bb858847eb0975ea8da5f675f..208d86c2cb564025a182c4446c9d54b20c7d3018 100644
|
| --- a/chrome/browser/resources/settings/site_settings/site_details_permission.js
|
| +++ b/chrome/browser/resources/settings/site_settings/site_details_permission.js
|
| @@ -41,6 +41,19 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * Returns true if the origins match, e.g. http://google.com and
|
| + * http://[*.]google.com.
|
| + * @param {string} left The first origin to compare.
|
| + * @param {string} right The second origin to compare.
|
| + * @return {boolean} True if the origins are the same.
|
| + * @private
|
| + */
|
| + sameOrigin_: function(left, right) {
|
| + return this.removePatternWildcard_(left) ==
|
| + this.removePatternWildcard_(right);
|
| + },
|
| +
|
| + /**
|
| * Sets the site to display.
|
| * @param {!SiteException} site The site to display.
|
| * @private
|
| @@ -51,7 +64,7 @@ Polymer({
|
| this.browserProxy.getExceptionList(this.category).then(
|
| function(exceptionList) {
|
| for (var i = 0; i < exceptionList.length; ++i) {
|
| - if (exceptionList[i].origin == site.origin) {
|
| + if (this.sameOrigin_(exceptionList[i].origin, site.origin)) {
|
| this.$.permission.selected = exceptionList[i].setting;
|
| this.$.details.hidden = false;
|
| }
|
|
|