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

Unified Diff: chrome/browser/component_updater/pepper_flash_component_installer.cc

Issue 11151006: Revert 161615 - Merge 161210 - Only register the newer one of {bundled, component} Pepper Flash. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/plugin_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/pepper_flash_component_installer.cc
===================================================================
--- chrome/browser/component_updater/pepper_flash_component_installer.cc (revision 161723)
+++ chrome/browser/component_updater/pepper_flash_component_installer.cc (working copy)
@@ -18,7 +18,6 @@
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "base/version.h"
#include "build/build_config.h"
@@ -166,38 +165,12 @@
return true;
}
-bool IsPepperFlash(const webkit::WebPluginInfo& plugin) {
- // We try to recognize Pepper Flash by the following criteria:
- // * It is a Pepper plug-in.
- // * It has the special Flash permissions.
- return webkit::IsPepperPlugin(plugin) &&
- (plugin.pepper_permissions & ppapi::PERMISSION_FLASH);
-}
-
void RegisterPepperFlashWithChrome(const FilePath& path,
const Version& version) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
content::PepperPluginInfo plugin_info;
if (!MakePepperFlashPluginInfo(path, version, true, &plugin_info))
return;
-
- std::vector<webkit::WebPluginInfo> plugins;
- PluginService::GetInstance()->GetInternalPlugins(&plugins);
- for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin();
- it != plugins.end(); ++it) {
- if (!IsPepperFlash(*it))
- continue;
-
- // If the version we're trying to register is older than the existing one,
- // don't do it.
- if (version.IsOlderThan(UTF16ToUTF8(it->version)))
- return;
-
- // If the version is newer, remove the old one first.
- PluginService::GetInstance()->UnregisterInternalPlugin(it->path);
- break;
- }
-
bool add_to_front = IsPepperFlashEnabledByDefault();
PluginService::GetInstance()->RegisterInternalPlugin(
plugin_info.ToWebPluginInfo(), add_to_front);
« no previous file with comments | « no previous file | content/browser/plugin_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698