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

Unified Diff: chrome/renderer/render_view.cc

Issue 2080016: Don't use command line flags for enabling the internal pdf plugin. Instead, ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « chrome/renderer/render_process_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 47861)
+++ chrome/renderer/render_view.cc (working copy)
@@ -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_constants.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/chrome_constants.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/page_zoom.h"
@@ -3106,6 +3108,9 @@
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;
@@ -3125,9 +3130,7 @@
// 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;
}
« no previous file with comments | « chrome/renderer/render_process_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698