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

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: address comments. read location of pepperflash from registry. 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 system_path;
382 PathService::Get(chrome::DIR_PEPPER_FLASH_DEBUGGER_PLUGIN, &debug_path); 382 PathService::Get(chrome::DIR_PEPPER_FLASH_SYSTEM_PLUGIN, &system_path);
383 if (group_plugin.path.DirName() == debug_path) 383 if (group_plugin.path.DirName() == system_path) {
384 #if defined(GOOGLE_CHROME_BUILD)
385 // Existing documentation for debugging Flash describe this plugin as
386 // "Debug" so preserve this nomenclature here.
384 desc += base::ASCIIToUTF16(" Debug"); 387 desc += base::ASCIIToUTF16(" Debug");
388 #else
389 // On Chromium, we can name it what it really is; the system plugin.
390 desc += base::ASCIIToUTF16(" System");
391 #endif
392 }
385 } 393 }
386 plugin_file->SetString("description", desc); 394 plugin_file->SetString("description", desc);
387 395
388 plugin_file->SetString("path", group_plugin.path.value()); 396 plugin_file->SetString("path", group_plugin.path.value());
389 plugin_file->SetString("version", group_plugin.version); 397 plugin_file->SetString("version", group_plugin.version);
390 plugin_file->SetString("type", PluginTypeToString(group_plugin.type)); 398 plugin_file->SetString("type", PluginTypeToString(group_plugin.type));
391 399
392 base::ListValue* mime_types = new base::ListValue(); 400 base::ListValue* mime_types = new base::ListValue();
393 const std::vector<content::WebPluginMimeType>& plugin_mime_types = 401 const std::vector<content::WebPluginMimeType>& plugin_mime_types =
394 group_plugin.mime_types; 402 group_plugin.mime_types;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 void PluginsUI::RegisterProfilePrefs( 524 void PluginsUI::RegisterProfilePrefs(
517 user_prefs::PrefRegistrySyncable* registry) { 525 user_prefs::PrefRegistrySyncable* registry) {
518 registry->RegisterBooleanPref( 526 registry->RegisterBooleanPref(
519 prefs::kPluginsShowDetails, 527 prefs::kPluginsShowDetails,
520 false, 528 false,
521 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 529 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
522 registry->RegisterDictionaryPref( 530 registry->RegisterDictionaryPref(
523 prefs::kContentSettingsPluginWhitelist, 531 prefs::kContentSettingsPluginWhitelist,
524 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 532 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
525 } 533 }
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/test/component_installers_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698