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

Side by Side Diff: chrome/browser/resources/settings/site_settings/add_site_dialog.js

Issue 2682023002: [MD settings] allow site exceptions without pattern wildcard (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_settings_behavior.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_settings_behavior.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698