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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 2463913002: Do not replace up-to-date System Flash with Component Flash. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 616c9b15d2dfe692618f4e9fd7b24e3dc4e75d74..b8bd2f4f2cb04cf5bcc7938687936b2d9e084973 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -231,28 +231,18 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
// Creates a PepperPluginInfo for the specified plugin.
// |path| is the full path to the plugin.
// |version| is a string representation of the plugin version.
-// |is_debug| is whether the plugin is the debug version or not.
// |is_external| is whether the plugin is supplied external to Chrome e.g. a
// system installation of Adobe Flash.
-// |is_bundled| distinguishes between component updated plugin and a bundled
-// plugin.
content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
const std::string& version,
- bool is_debug,
- bool is_external,
- bool is_bundled) {
+ bool is_external) {
content::PepperPluginInfo plugin;
plugin.is_out_of_process = true;
plugin.name = content::kFlashPluginName;
plugin.path = path;
-#if defined(OS_WIN)
- plugin.is_on_local_drive = !base::IsOnNetworkDrive(path);
-#endif
plugin.permissions = chrome::kPepperFlashPermissions;
- plugin.is_debug = is_debug;
plugin.is_external = is_external;
- plugin.is_bundled = is_bundled;
std::vector<std::string> flash_version_numbers = base::SplitString(
version, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
@@ -293,8 +283,8 @@ bool GetCommandLinePepperFlash(content::PepperPluginInfo* plugin) {
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kPpapiFlashVersion);
- *plugin = CreatePepperFlashInfo(base::FilePath(flash_path),
- flash_version, false, true, false);
+ *plugin = CreatePepperFlashInfo(base::FilePath(flash_path), flash_version,
+ true);
return true;
}
@@ -322,7 +312,7 @@ bool GetComponentUpdatedPepperFlash(content::PepperPluginInfo* plugin) {
"bundled or system plugin.";
return false;
}
- *plugin = CreatePepperFlashInfo(flash_path, version, false, false, false);
+ *plugin = CreatePepperFlashInfo(flash_path, version, false);
return true;
}
LOG(ERROR)
@@ -366,11 +356,7 @@ bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) {
if (!chrome::CheckPepperFlashManifest(*manifest, &version))
return false;
- *plugin = CreatePepperFlashInfo(flash_filename,
- version.GetString(),
- chrome::IsSystemFlashScriptDebuggerPresent(),
- true,
- false);
+ *plugin = CreatePepperFlashInfo(flash_filename, version.GetString(), true);
return true;
}
#endif // defined(ENABLE_PLUGINS)
@@ -459,16 +445,14 @@ content::PepperPluginInfo* ChromeContentClient::FindMostRecentPlugin(
if (plugins.empty())
return nullptr;
- using PluginSortKey = std::tuple<base::Version, bool, bool, bool, bool>;
+ using PluginSortKey = std::tuple<base::Version, bool>;
std::map<PluginSortKey, content::PepperPluginInfo*> plugin_map;
for (auto* plugin : plugins) {
base::Version version(plugin->version);
DCHECK(version.IsValid());
- plugin_map[PluginSortKey(version, plugin->is_debug,
- plugin->is_bundled, plugin->is_on_local_drive,
- !plugin->is_external)] = plugin;
+ plugin_map[PluginSortKey(version, plugin->is_external)] = plugin;
}
return plugin_map.rbegin()->second;
@@ -522,7 +506,7 @@ void ChromeContentClient::AddPepperPlugins(
// better than any other hardcoded alternative.
plugins->push_back(CreatePepperFlashInfo(
base::FilePath::FromUTF8Unsafe(ChromeContentClient::kNotPresent),
- FLAPPER_VERSION_STRING, false, false, true));
+ FLAPPER_VERSION_STRING, false));
#endif // defined(GOOGLE_CHROME_BUILD) && defined(FLAPPER_AVAILABLE)
}
#endif // defined(ENABLE_PLUGINS)
« no previous file with comments | « chrome/browser/component_updater/pepper_flash_component_installer.cc ('k') | chrome/common/chrome_content_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698