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

Side by Side Diff: chrome/browser/resources/plugins.js

Issue 2150323003: Disallow user overrides to enterprise policy for plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits and owners Created 4 years, 5 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 | « chrome/browser/resources/plugins.html ('k') | chrome/browser/ui/webui/plugins/OWNERS » ('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 (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 /** 5 /**
6 * Takes the |pluginsData| input argument which represents data about the 6 * Takes the |pluginsData| input argument which represents data about the
7 * currently installed/running plugins and populates the html jstemplate with 7 * currently installed/running plugins and populates the html jstemplate with
8 * that data. 8 * that data.
9 * @param {Object} pluginsData Detailed info about installed plugins. Same 9 * @param {Object} pluginsData Detailed info about installed plugins. Same
10 * expected format as returnPluginsData(). 10 * expected format as returnPluginsData().
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 /** 244 /**
245 * @param {Object} plugin An object containing the information about a plugin. 245 * @param {Object} plugin An object containing the information about a plugin.
246 * See returnPluginsData() for the format of this object. 246 * See returnPluginsData() for the format of this object.
247 * @return {boolean} Whether the plugin is fully trusted. 247 * @return {boolean} Whether the plugin is fully trusted.
248 */ 248 */
249 function isPluginTrusted(plugin) { 249 function isPluginTrusted(plugin) {
250 return plugin.trusted == true; 250 return plugin.trusted == true;
251 } 251 }
252 252
253 /** 253 /**
254 * @param {Object} plugin An object containing the information about a plugin.
255 * See returnPluginsData() for the format of this object.
256 * @return {boolean} Whether the plugin is marked click to play by policy.
257 *
258 * This would normally be set by setting the policy DefaultPluginsSetting to 3.
259 */
260 function isPluginPolicyClickToPlay(plugin) {
261 return plugin.policy_click_to_play == true;
262 }
263
264 /**
254 * Helper to convert callback-based define() API to a promise-based API. 265 * Helper to convert callback-based define() API to a promise-based API.
255 * @param {!Array<string>} moduleNames 266 * @param {!Array<string>} moduleNames
256 * @return {!Promise} 267 * @return {!Promise}
257 */ 268 */
258 function importModules(moduleNames) { 269 function importModules(moduleNames) {
259 return new Promise(function(resolve, reject) { 270 return new Promise(function(resolve, reject) {
260 define(moduleNames, function(var_args) { 271 define(moduleNames, function(var_args) {
261 resolve(Array.prototype.slice.call(arguments, 0)); 272 resolve(Array.prototype.slice.call(arguments, 0));
262 }); 273 });
263 }); 274 });
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 340
330 // Unfortunately, we don't have notifications for plugin (list) status 341 // Unfortunately, we don't have notifications for plugin (list) status
331 // changes (yet), so in the meanwhile just update regularly. 342 // changes (yet), so in the meanwhile just update regularly.
332 setInterval(function() { 343 setInterval(function() {
333 browserProxy.getPluginsData().then(returnPluginsData); 344 browserProxy.getPluginsData().then(returnPluginsData);
334 }, 30000); 345 }, 30000);
335 }); 346 });
336 } 347 }
337 348
338 document.addEventListener('DOMContentLoaded', main); 349 document.addEventListener('DOMContentLoaded', main);
OLDNEW
« no previous file with comments | « chrome/browser/resources/plugins.html ('k') | chrome/browser/ui/webui/plugins/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698