Index: chrome/browser/plugin_updater.cc |
=================================================================== |
--- chrome/browser/plugin_updater.cc (revision 64006) |
+++ chrome/browser/plugin_updater.cc (working copy) |
@@ -132,6 +132,8 @@ |
bool found_internal_pdf = false; |
bool force_enable_internal_pdf = false; |
string16 pdf_group_name = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName); |
+ bool force_internal_pdf_for_this_run = CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kForceInternalPDFPlugin); |
FilePath pdf_path; |
PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path); |
FilePath::StringType pdf_path_str = pdf_path.value(); |
@@ -177,9 +179,13 @@ |
if (FilePath::CompareIgnoreCase(path, pdf_path_str) == 0) { |
found_internal_pdf = true; |
- if (!enabled && force_enable_internal_pdf) { |
- enabled = true; |
- plugin->SetBoolean("enabled", true); |
+ if (!enabled) { |
+ if (force_enable_internal_pdf) { |
+ enabled = true; |
+ plugin->SetBoolean("enabled", true); |
+ } else if (force_internal_pdf_for_this_run) { |
+ enabled = true; |
+ } |
} |
} |
if (!enabled) |
@@ -202,7 +208,8 @@ |
profile->GetPrefs()->GetList(prefs::kPluginsPluginsBlacklist); |
DisablePluginsFromPolicy(plugin_blacklist); |
- if (!enable_internal_pdf_ && !found_internal_pdf) { |
+ if ((!enable_internal_pdf_ && !found_internal_pdf) && |
+ !force_internal_pdf_for_this_run) { |
// The internal PDF plugin is disabled by default, and the user hasn't |
// overridden the default. |
NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path); |