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

Side by Side Diff: chrome/browser/ui/webui/plugins_ui.cc

Issue 10263022: Move version metadata from PluginGroup into PluginInstaller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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/ui/pdf/pdf_unsupported_feature.cc ('k') | chrome/chrome_tests.gypi » ('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 #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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 plugin_files->Append(plugin_file); 420 plugin_files->Append(plugin_file);
421 } 421 }
422 DictionaryValue* group_data = new DictionaryValue(); 422 DictionaryValue* group_data = new DictionaryValue();
423 423
424 group_data->Set("plugin_files", plugin_files); 424 group_data->Set("plugin_files", plugin_files);
425 group_data->SetString("name", group_name); 425 group_data->SetString("name", group_name);
426 group_data->SetString("id", group.identifier()); 426 group_data->SetString("id", group.identifier());
427 group_data->SetString("description", active_plugin->desc); 427 group_data->SetString("description", active_plugin->desc);
428 group_data->SetString("version", active_plugin->version); 428 group_data->SetString("version", active_plugin->version);
429 group_data->SetBoolean("critical", group.IsVulnerable(*active_plugin));
430 429
431 std::string update_url;
432 #if defined(ENABLE_PLUGIN_INSTALLATION) 430 #if defined(ENABLE_PLUGIN_INSTALLATION)
433 PluginInstaller* installer = 431 PluginInstaller* installer =
434 plugin_finder->FindPluginWithIdentifier(group.identifier()); 432 plugin_finder->FindPluginWithIdentifier(group.identifier());
435 if (installer) 433 if (installer) {
436 update_url = installer->plugin_url().spec(); 434 bool out_of_date = installer->GetSecurityStatus(*active_plugin) ==
435 PluginInstaller::SECURITY_STATUS_OUT_OF_DATE;
436 group_data->SetBoolean("critical", out_of_date);
437 group_data->SetString("update_url", installer->plugin_url().spec());
438 }
437 #endif 439 #endif
438 group_data->SetString("update_url", update_url);
439 440
440 std::string enabled_mode; 441 std::string enabled_mode;
441 if (all_plugins_enabled_by_policy) { 442 if (all_plugins_enabled_by_policy) {
442 enabled_mode = "enabledByPolicy"; 443 enabled_mode = "enabledByPolicy";
443 } else if (all_plugins_disabled_by_policy) { 444 } else if (all_plugins_disabled_by_policy) {
444 enabled_mode = "disabledByPolicy"; 445 enabled_mode = "disabledByPolicy";
445 } else if (group_enabled) { 446 } else if (group_enabled) {
446 enabled_mode = "enabledByUser"; 447 enabled_mode = "enabledByUser";
447 } else { 448 } else {
448 enabled_mode = "disabledByUser"; 449 enabled_mode = "disabledByUser";
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { 491 void PluginsUI::RegisterUserPrefs(PrefService* prefs) {
491 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, 492 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails,
492 false, 493 false,
493 PrefService::UNSYNCABLE_PREF); 494 PrefService::UNSYNCABLE_PREF);
494 prefs->RegisterBooleanPref(prefs::kPluginsShowSetReaderDefaultInfobar, 495 prefs->RegisterBooleanPref(prefs::kPluginsShowSetReaderDefaultInfobar,
495 true, 496 true,
496 PrefService::UNSYNCABLE_PREF); 497 PrefService::UNSYNCABLE_PREF);
497 prefs->RegisterDictionaryPref(prefs::kContentSettingsPluginWhitelist, 498 prefs->RegisterDictionaryPref(prefs::kContentSettingsPluginWhitelist,
498 PrefService::SYNCABLE_PREF); 499 PrefService::SYNCABLE_PREF);
499 } 500 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/pdf/pdf_unsupported_feature.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698