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

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

Issue 893823002: Register system Pepper Flash plugin if no packaged Pepper plugin is found. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better mac support Created 5 years, 10 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 #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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 bool all_plugins_disabled_by_policy = true; 365 bool all_plugins_disabled_by_policy = true;
366 bool all_plugins_managed_by_policy = true; 366 bool all_plugins_managed_by_policy = true;
367 const WebPluginInfo* active_plugin = NULL; 367 const WebPluginInfo* active_plugin = NULL;
368 for (size_t j = 0; j < group_plugins.size(); ++j) { 368 for (size_t j = 0; j < group_plugins.size(); ++j) {
369 const WebPluginInfo& group_plugin = *group_plugins[j]; 369 const WebPluginInfo& group_plugin = *group_plugins[j];
370 370
371 base::DictionaryValue* plugin_file = new base::DictionaryValue(); 371 base::DictionaryValue* plugin_file = new base::DictionaryValue();
372 plugin_file->SetString("name", group_plugin.name); 372 plugin_file->SetString("name", group_plugin.name);
373 373
374 // If this plugin is Pepper Flash, and the plugin path is the same as the 374 // If this plugin is Pepper Flash, and the plugin path is the same as the
375 // path for the Pepper Flash Debugger plugin, then mark this plugin 375 // path for the Pepper Flash System plugin, then mark this plugin
376 // description as the debugger plugin to help the user disambiguate the 376 // description as the system plugin to help the user disambiguate the
377 // two plugins. 377 // two plugins.
378 base::string16 desc = group_plugin.desc; 378 base::string16 desc = group_plugin.desc;
379 if (group_plugin.is_pepper_plugin() && 379 if (group_plugin.is_pepper_plugin() &&
380 group_plugin.name == base::ASCIIToUTF16(content::kFlashPluginName)) { 380 group_plugin.name == base::ASCIIToUTF16(content::kFlashPluginName)) {
381 base::FilePath debug_path; 381 base::FilePath debug_path;
382 PathService::Get(chrome::DIR_PEPPER_FLASH_DEBUGGER_PLUGIN, &debug_path); 382 PathService::Get(chrome::DIR_PEPPER_FLASH_SYSTEM_PLUGIN, &debug_path);
383 if (group_plugin.path.DirName() == debug_path) 383 if (group_plugin.path.DirName() == debug_path)
384 desc += base::ASCIIToUTF16(" Debug"); 384 desc += base::ASCIIToUTF16(" System");
385 } 385 }
386 plugin_file->SetString("description", desc); 386 plugin_file->SetString("description", desc);
387 387
388 plugin_file->SetString("path", group_plugin.path.value()); 388 plugin_file->SetString("path", group_plugin.path.value());
389 plugin_file->SetString("version", group_plugin.version); 389 plugin_file->SetString("version", group_plugin.version);
390 plugin_file->SetString("type", PluginTypeToString(group_plugin.type)); 390 plugin_file->SetString("type", PluginTypeToString(group_plugin.type));
391 391
392 base::ListValue* mime_types = new base::ListValue(); 392 base::ListValue* mime_types = new base::ListValue();
393 const std::vector<content::WebPluginMimeType>& plugin_mime_types = 393 const std::vector<content::WebPluginMimeType>& plugin_mime_types =
394 group_plugin.mime_types; 394 group_plugin.mime_types;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 void PluginsUI::RegisterProfilePrefs( 516 void PluginsUI::RegisterProfilePrefs(
517 user_prefs::PrefRegistrySyncable* registry) { 517 user_prefs::PrefRegistrySyncable* registry) {
518 registry->RegisterBooleanPref( 518 registry->RegisterBooleanPref(
519 prefs::kPluginsShowDetails, 519 prefs::kPluginsShowDetails,
520 false, 520 false,
521 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 521 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
522 registry->RegisterDictionaryPref( 522 registry->RegisterDictionaryPref(
523 prefs::kContentSettingsPluginWhitelist, 523 prefs::kContentSettingsPluginWhitelist,
524 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 524 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
525 } 525 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698