Index: chrome/browser/component_updater/pepper_flash_component_installer.cc |
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc |
index 2a84cefd2e3c34b059421bfcc45b81f8a629ed61..4f5225b300e2a1d85a4164bcde8dd4391586c39b 100644 |
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc |
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc |
@@ -28,6 +28,7 @@ |
#include "build/build_config.h" |
#include "chrome/browser/plugins/plugin_prefs.h" |
#include "chrome/common/chrome_constants.h" |
+#include "chrome/common/chrome_content_client.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pepper_flash.h" |
@@ -113,10 +114,19 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path, |
std::vector<content::WebPluginInfo> plugins; |
PluginService::GetInstance()->GetInternalPlugins(&plugins); |
+ base::FilePath placeholder_path = |
+ base::FilePath::FromUTF8Unsafe(ChromeContentClient::kNotPresent); |
for (const auto& plugin : plugins) { |
if (!plugin.is_pepper_plugin() || plugin.name != web_plugin.name) |
continue; |
+ if (plugin.path == placeholder_path) { |
+ // This is the Flash placeholder; replace it regardless of version or |
+ // other considerations. |
+ PluginService::GetInstance()->UnregisterInternalPlugin(plugin.path); |
+ break; |
+ } |
+ |
Version registered_version(base::UTF16ToUTF8(plugin.version)); |
// If lower version, never register. |