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

Side by Side Diff: chrome/browser/resources/options/content_settings_exceptions_area.js

Issue 1825173003: [Policy Experimental] Add "recommended" policies for URL exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options.contentSettings', function() { 5 cr.define('options.contentSettings', function() {
6 /** @const */ var ControlledSettingIndicator = 6 /** @const */ var ControlledSettingIndicator =
7 options.ControlledSettingIndicator; 7 options.ControlledSettingIndicator;
8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList;
9 /** @const */ var InlineEditableItem = options.InlineEditableItem; 9 /** @const */ var InlineEditableItem = options.InlineEditableItem;
10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 var controlledBy = 196 var controlledBy =
197 this.dataItem.source && this.dataItem.source != 'preference' ? 197 this.dataItem.source && this.dataItem.source != 'preference' ?
198 this.dataItem.source : null; 198 this.dataItem.source : null;
199 199
200 if (controlledBy) { 200 if (controlledBy) {
201 this.setAttribute('controlled-by', controlledBy); 201 this.setAttribute('controlled-by', controlledBy);
202 this.deletable = false; 202 this.deletable = false;
203 this.editable = false; 203 this.editable = false;
204 } 204 }
205 205
206 if (controlledBy == 'policy' || controlledBy == 'extension') { 206 if (controlledBy == 'policy' || controlledBy == 'extension' ||
207 controlledBy == 'recommended') {
207 this.querySelector('.row-delete-button').hidden = true; 208 this.querySelector('.row-delete-button').hidden = true;
208 var indicator = new ControlledSettingIndicator(); 209 var indicator = new ControlledSettingIndicator();
209 indicator.setAttribute('content-exception', this.contentType); 210 indicator.setAttribute('content-exception', this.contentType);
210 // Create a synthetic pref change event decorated as 211 // Create a synthetic pref change event decorated as
211 // CoreOptionsHandler::CreateValueForPref() does. 212 // CoreOptionsHandler::CreateValueForPref() does.
212 var event = new Event(this.contentType); 213 var event = new Event(this.contentType);
213 event.value = { controlledBy: controlledBy }; 214 event.value = { controlledBy: controlledBy };
214 indicator.handlePrefChange(event); 215 indicator.handlePrefChange(event);
215 this.appendChild(indicator); 216 this.appendChild(indicator);
216 } 217 }
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 697 }
697 }; 698 };
698 699
699 return { 700 return {
700 ExceptionsListItem: ExceptionsListItem, 701 ExceptionsListItem: ExceptionsListItem,
701 ExceptionsAddRowListItem: ExceptionsAddRowListItem, 702 ExceptionsAddRowListItem: ExceptionsAddRowListItem,
702 ExceptionsList: ExceptionsList, 703 ExceptionsList: ExceptionsList,
703 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, 704 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea,
704 }; 705 };
705 }); 706 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/content_settings.js ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698