summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorjhorwich@chromium.org <jhorwich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-09 00:16:35 +0000
committerjhorwich@chromium.org <jhorwich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-09 00:16:35 +0000
commitb3dc82b6fd757ca2314990afcad0c4650c43845e (patch)
tree94e7fea5d19cbdda85cb58aa7406bd1fa1ef6fdf /content/common
parent0574acb8af2e1cb78cc5797a90e92a0f7bbb2e7a (diff)
downloadchromium_src-b3dc82b6fd757ca2314990afcad0c4650c43845e.zip
chromium_src-b3dc82b6fd757ca2314990afcad0c4650c43845e.tar.gz
chromium_src-b3dc82b6fd757ca2314990afcad0c4650c43845e.tar.bz2
Support for unsandboxed out-of-process pepper.
Breaking apart changes in http://codereview.chromium.org/8041002/ to only include the infrastructure portion, as well as merging to account for moving PepperPluginInfo into content/public/common/pepper_plugin_info.* BUG=none TEST=Manual, set is_sandboxed to false in chrome_content_client and observe Review URL: http://codereview.chromium.org/8477007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/pepper_plugin_registry.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/content/common/pepper_plugin_registry.cc b/content/common/pepper_plugin_registry.cc
index 2316ec8..be7529d 100644
--- a/content/common/pepper_plugin_registry.cc
+++ b/content/common/pepper_plugin_registry.cc
@@ -79,7 +79,9 @@ webkit::WebPluginInfo content::PepperPluginInfo::ToWebPluginInfo() const {
webkit::WebPluginInfo info;
info.type = is_out_of_process ?
- webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS :
+ (is_sandboxed ?
+ webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS :
+ webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED) :
webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS;
info.name = name.empty() ?
@@ -97,9 +99,9 @@ bool MakePepperPluginInfo(const webkit::WebPluginInfo& webplugin_info,
if (!webkit::IsPepperPlugin(webplugin_info))
return false;
- pepper_info->is_out_of_process =
- webplugin_info.type ==
- webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS;
+ pepper_info->is_out_of_process = webkit::IsOutOfProcessPlugin(webplugin_info);
+ pepper_info->is_sandboxed = webplugin_info.type !=
+ webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED;
pepper_info->path = FilePath(webplugin_info.path);
pepper_info->name = UTF16ToASCII(webplugin_info.name);
@@ -131,7 +133,7 @@ void PepperPluginRegistry::PreloadModules() {
std::vector<content::PepperPluginInfo> plugins;
ComputeList(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
- if (!plugins[i].is_internal) {
+ if (!plugins[i].is_internal && plugins[i].is_sandboxed) {
std::string error;
base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path,
&error);