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

Unified Diff: chrome/browser/plugin_updater.cc

Issue 2720002: Add automated tests for PDFs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698