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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 2862583007: Allow command-line and system Flash when --disable-bundled-pepper-flash. (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index de5a0d80c78a50c913da6f225cd6a84768d27726..ac5ffb50b3f07e563a8f70eafef91bfcc25bf47c 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -481,8 +481,8 @@ void ChromeContentClient::AddPepperPlugins(
// If flash is disabled, do not try to add any flash plugin.
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kDisableBundledPpapiFlash))
- return;
+ bool disable_bundled_flash =
+ command_line->HasSwitch(switches::kDisableBundledPpapiFlash);
std::vector<std::unique_ptr<content::PepperPluginInfo>> flash_versions;
@@ -496,7 +496,8 @@ void ChromeContentClient::AddPepperPlugins(
return;
auto component_flash = base::MakeUnique<content::PepperPluginInfo>();
- if (GetComponentUpdatedPepperFlash(component_flash.get()))
+ if (!disable_bundled_flash &&
+ GetComponentUpdatedPepperFlash(component_flash.get()))
flash_versions.push_back(std::move(component_flash));
#endif // defined(OS_LINUX)
@@ -512,7 +513,7 @@ void ChromeContentClient::AddPepperPlugins(
content::PepperPluginInfo* max_flash = FindMostRecentPlugin(flash_versions);
if (max_flash) {
plugins->push_back(*max_flash);
- } else {
+ } else if (!disable_bundled_flash) {
#if defined(GOOGLE_CHROME_BUILD) && defined(FLAPPER_AVAILABLE)
// Add a fake Flash plugin even though it doesn't actually exist - if a
// web page requests it, it will be component-updated on-demand. There is
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698