OLD | NEW |
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 #include "chrome/browser/ui/webui/plugins_ui.h" | 5 #include "chrome/browser/ui/webui/plugins_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 plugin_files->Append(plugin_file); | 451 plugin_files->Append(plugin_file); |
452 } | 452 } |
453 base::DictionaryValue* group_data = new base::DictionaryValue(); | 453 base::DictionaryValue* group_data = new base::DictionaryValue(); |
454 | 454 |
455 group_data->Set("plugin_files", plugin_files); | 455 group_data->Set("plugin_files", plugin_files); |
456 group_data->SetString("name", group_name); | 456 group_data->SetString("name", group_name); |
457 group_data->SetString("id", group_identifier); | 457 group_data->SetString("id", group_identifier); |
458 group_data->SetString("description", active_plugin->desc); | 458 group_data->SetString("description", active_plugin->desc); |
459 group_data->SetString("version", active_plugin->version); | 459 group_data->SetString("version", active_plugin->version); |
460 | 460 |
| 461 #if defined(ENABLE_PLUGIN_INSTALLATION) |
461 bool out_of_date = plugin_metadata->GetSecurityStatus(*active_plugin) == | 462 bool out_of_date = plugin_metadata->GetSecurityStatus(*active_plugin) == |
462 PluginMetadata::SECURITY_STATUS_OUT_OF_DATE; | 463 PluginMetadata::SECURITY_STATUS_OUT_OF_DATE; |
463 group_data->SetBoolean("critical", out_of_date); | 464 group_data->SetBoolean("critical", out_of_date); |
464 group_data->SetString("update_url", plugin_metadata->plugin_url().spec()); | 465 group_data->SetString("update_url", plugin_metadata->plugin_url().spec()); |
| 466 #endif |
465 | 467 |
466 std::string enabled_mode; | 468 std::string enabled_mode; |
467 if (all_plugins_enabled_by_policy) { | 469 if (all_plugins_enabled_by_policy) { |
468 enabled_mode = "enabledByPolicy"; | 470 enabled_mode = "enabledByPolicy"; |
469 } else if (all_plugins_disabled_by_policy) { | 471 } else if (all_plugins_disabled_by_policy) { |
470 enabled_mode = "disabledByPolicy"; | 472 enabled_mode = "disabledByPolicy"; |
471 } else if (all_plugins_managed_by_policy) { | 473 } else if (all_plugins_managed_by_policy) { |
472 enabled_mode = "managedByPolicy"; | 474 enabled_mode = "managedByPolicy"; |
473 } else if (group_enabled) { | 475 } else if (group_enabled) { |
474 enabled_mode = "enabledByUser"; | 476 enabled_mode = "enabledByUser"; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 } | 519 } |
518 | 520 |
519 // static | 521 // static |
520 void PluginsUI::RegisterProfilePrefs( | 522 void PluginsUI::RegisterProfilePrefs( |
521 user_prefs::PrefRegistrySyncable* registry) { | 523 user_prefs::PrefRegistrySyncable* registry) { |
522 registry->RegisterBooleanPref(prefs::kPluginsShowDetails, false); | 524 registry->RegisterBooleanPref(prefs::kPluginsShowDetails, false); |
523 registry->RegisterDictionaryPref( | 525 registry->RegisterDictionaryPref( |
524 prefs::kContentSettingsPluginWhitelist, | 526 prefs::kContentSettingsPluginWhitelist, |
525 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 527 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
526 } | 528 } |
OLD | NEW |