| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'add-site-dialog' provides a dialog to add exceptions for a given Content | 7 * 'add-site-dialog' provides a dialog to add exceptions for a given Content |
| 8 * Settings category. | 8 * Settings category. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 }, | 79 }, |
| 80 | 80 |
| 81 /** | 81 /** |
| 82 * The tap handler for the Add [Site] button (adds the pattern and closes | 82 * The tap handler for the Add [Site] button (adds the pattern and closes |
| 83 * the dialog). | 83 * the dialog). |
| 84 * @private | 84 * @private |
| 85 */ | 85 */ |
| 86 onSubmit_: function() { | 86 onSubmit_: function() { |
| 87 if (this.$.add.disabled) | 87 if (this.$.add.disabled) |
| 88 return; // Can happen when Enter is pressed. | 88 return; // Can happen when Enter is pressed. |
| 89 var pattern = this.addPatternWildcard(this.site_); | |
| 90 this.browserProxy.setCategoryPermissionForOrigin( | 89 this.browserProxy.setCategoryPermissionForOrigin( |
| 91 pattern, pattern, this.category, this.contentSetting, | 90 this.site_, this.site_, this.category, this.contentSetting, |
| 92 this.$.incognito.checked); | 91 this.$.incognito.checked); |
| 93 this.$.dialog.close(); | 92 this.$.dialog.close(); |
| 94 }, | 93 }, |
| 95 }); | 94 }); |
| OLD | NEW |