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

Side by Side Diff: chrome/common/plugin_group.cc

Issue 3146006: Merge 55541 - Re-enable the link to disable invididual plug-ins in a group.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/plugins.html ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/common/plugin_group.h" 5 #include "chrome/common/plugin_group.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 const WebPluginInfo& web_plugin = web_plugin_infos_[i]; 278 const WebPluginInfo& web_plugin = web_plugin_infos_[i];
279 int priority = web_plugin_positions_[i]; 279 int priority = web_plugin_positions_[i];
280 DictionaryValue* plugin_file = new DictionaryValue(); 280 DictionaryValue* plugin_file = new DictionaryValue();
281 plugin_file->SetStringFromUTF16(L"name", web_plugin.name); 281 plugin_file->SetStringFromUTF16(L"name", web_plugin.name);
282 plugin_file->SetStringFromUTF16(L"description", web_plugin.desc); 282 plugin_file->SetStringFromUTF16(L"description", web_plugin.desc);
283 plugin_file->SetString(L"path", web_plugin.path.value()); 283 plugin_file->SetString(L"path", web_plugin.path.value());
284 plugin_file->SetStringFromUTF16(L"version", web_plugin.version); 284 plugin_file->SetStringFromUTF16(L"version", web_plugin.version);
285 bool plugin_disabled_by_policy = group_disabled_by_policy || 285 bool plugin_disabled_by_policy = group_disabled_by_policy ||
286 IsPluginNameDisabledByPolicy(web_plugin.name); 286 IsPluginNameDisabledByPolicy(web_plugin.name);
287 if (plugin_disabled_by_policy) { 287 if (plugin_disabled_by_policy) {
288 result->SetString(L"enabledMode", L"disabledByPolicy"); 288 plugin_file->SetString(L"enabledMode", L"disabledByPolicy");
289 } else { 289 } else {
290 result->SetString(L"enabledMode", 290 plugin_file->SetString(L"enabledMode",
291 web_plugin.enabled ? L"enabled" : L"disabledByUser"); 291 web_plugin.enabled ? L"enabled" : L"disabledByUser");
292 } 292 }
293 plugin_file->SetInteger(L"priority", priority); 293 plugin_file->SetInteger(L"priority", priority);
294 294
295 ListValue* mime_types = new ListValue(); 295 ListValue* mime_types = new ListValue();
296 for (std::vector<WebPluginMimeType>::const_iterator type_it = 296 for (std::vector<WebPluginMimeType>::const_iterator type_it =
297 web_plugin.mime_types.begin(); 297 web_plugin.mime_types.begin();
298 type_it != web_plugin.mime_types.end(); 298 type_it != web_plugin.mime_types.end();
299 ++type_it) { 299 ++type_it) {
300 DictionaryValue* mime_type = new DictionaryValue(); 300 DictionaryValue* mime_type = new DictionaryValue();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 web_plugin_infos_.begin(); 334 web_plugin_infos_.begin();
335 it != web_plugin_infos_.end(); ++it) { 335 it != web_plugin_infos_.end(); ++it) {
336 if (enable && !IsPluginNameDisabledByPolicy(it->name)) { 336 if (enable && !IsPluginNameDisabledByPolicy(it->name)) {
337 NPAPI::PluginList::Singleton()->EnablePlugin(FilePath(it->path)); 337 NPAPI::PluginList::Singleton()->EnablePlugin(FilePath(it->path));
338 } else { 338 } else {
339 NPAPI::PluginList::Singleton()->DisablePlugin(FilePath(it->path)); 339 NPAPI::PluginList::Singleton()->DisablePlugin(FilePath(it->path));
340 } 340 }
341 } 341 }
342 } 342 }
343 343
OLDNEW
« no previous file with comments | « chrome/browser/resources/plugins.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698