diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-22 00:14:28 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-22 00:14:28 +0000 |
commit | 7bf795d901efbf80cdb36f2faa35e016aaeb82b6 (patch) | |
tree | c3616e2e1be420605438202cb04c8a198786eb52 /chrome/renderer/render_view.cc | |
parent | 438c97d23785f28465304e1cb521b5125e9ea469 (diff) | |
download | chromium_src-7bf795d901efbf80cdb36f2faa35e016aaeb82b6.zip chromium_src-7bf795d901efbf80cdb36f2faa35e016aaeb82b6.tar.gz chromium_src-7bf795d901efbf80cdb36f2faa35e016aaeb82b6.tar.bz2 |
Don't use command line flags for enabling the internal pdf plugin. Instead, disable it by default using the same mechanism that we use for about:plugins. Once we enable it by default, we just need to flip a boolean in the code and it'll be enabled for everyone.
Review URL: http://codereview.chromium.org/2080016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index d72b965..e1a0dc3 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -16,6 +16,7 @@ #include "base/compiler_specific.h" #include "base/field_trial.h" #include "base/histogram.h" +#include "base/path_service.h" #include "base/process_util.h" #include "base/singleton.h" #include "base/string_piece.h" @@ -25,8 +26,9 @@ #include "chrome/common/appcache/appcache_dispatcher.h" #include "chrome/common/bindings_policy.h" #include "chrome/common/child_process_logging.h" -#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/page_zoom.h" @@ -3114,6 +3116,9 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate( if (path.value().empty()) return NULL; + FilePath internal_pdf_path; + PathService::Get(chrome::FILE_PDF_PLUGIN, &internal_pdf_path); + const std::string* mime_type_to_use; if (!actual_mime_type->empty()) mime_type_to_use = actual_mime_type; @@ -3133,9 +3138,7 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate( // In process Pepper plugins must be explicitly enabled. return NULL; } - } else if (CommandLine::ForCurrentProcess()-> - HasSwitch(switches::kInternalPDF) && - StartsWithASCII(*mime_type_to_use, "application/pdf", true)) { + } else if (path == internal_pdf_path) { in_process_plugin = true; use_pepper_host = true; } |