summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 18:12:41 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 18:12:41 +0000
commit195d4cde0da1d590ea978da9e532feceebe12ec1 (patch)
treef93460315e38383d74dcb46590275ef989b40caa /content/browser
parent8a56410423d622cf586c7587f6c3634d391254d7 (diff)
downloadchromium_src-195d4cde0da1d590ea978da9e532feceebe12ec1.zip
chromium_src-195d4cde0da1d590ea978da9e532feceebe12ec1.tar.gz
chromium_src-195d4cde0da1d590ea978da9e532feceebe12ec1.tar.bz2
Hook up PpapiPermissions in more places.
This doesn't actually do much more checking of the permissions, but it should wire it up everywhere we'll need it. It will also at least only return public interfaces via GetInterface in the proxy now unless other bits are supplied. Review URL: https://codereview.chromium.org/10984094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159729 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/ppapi_plugin_process_host.cc9
-rw-r--r--content/browser/ppapi_plugin_process_host.h2
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
3 files changed, 8 insertions, 4 deletions
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 8042744..bb27c8d 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -161,7 +161,9 @@ PpapiPluginProcessHost::PpapiPluginProcessHost(
const content::PepperPluginInfo& info,
const FilePath& profile_data_directory,
net::HostResolver* host_resolver)
- : network_observer_(new PluginNetworkObserver(this)),
+ : permissions_(
+ ppapi::PpapiPermissions::GetForCommandLine(info.permissions)),
+ network_observer_(new PluginNetworkObserver(this)),
profile_data_directory_(profile_data_directory),
is_broker_(false) {
process_.reset(new BrowserChildProcessHostImpl(
@@ -170,8 +172,7 @@ PpapiPluginProcessHost::PpapiPluginProcessHost(
filter_ = new PepperMessageFilter(PepperMessageFilter::PLUGIN,
host_resolver);
- ppapi::PpapiPermissions permissions(info.permissions);
- host_impl_ = new content::BrowserPpapiHostImpl(this, permissions);
+ host_impl_ = new content::BrowserPpapiHostImpl(this, permissions_);
file_filter_ = new PepperTrustedFileMessageFilter(
process_->GetData().id, info.name, profile_data_directory);
@@ -315,7 +316,7 @@ void PpapiPluginProcessHost::OnChannelConnected(int32 peer_pid) {
// This will actually load the plugin. Errors will actually not be reported
// back at this point. Instead, the plugin will fail to establish the
// connections when we request them on behalf of the renderer(s).
- Send(new PpapiMsg_LoadPlugin(plugin_path_));
+ Send(new PpapiMsg_LoadPlugin(plugin_path_, permissions_));
// Process all pending channel requests from the renderers.
for (size_t i = 0; i < pending_requests_.size(); i++)
diff --git a/content/browser/ppapi_plugin_process_host.h b/content/browser/ppapi_plugin_process_host.h
index 1aa0384..b19536e 100644
--- a/content/browser/ppapi_plugin_process_host.h
+++ b/content/browser/ppapi_plugin_process_host.h
@@ -18,6 +18,7 @@
#include "content/public/browser/browser_child_process_host_delegate.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
#include "ipc/ipc_sender.h"
+#include "ppapi/shared_impl/ppapi_permissions.h"
class BrowserChildProcessHostImpl;
@@ -138,6 +139,7 @@ class PpapiPluginProcessHost : public content::BrowserChildProcessHostDelegate,
// Handles most requests from the plugin. May be NULL.
scoped_refptr<PepperMessageFilter> filter_;
+ ppapi::PpapiPermissions permissions_;
scoped_refptr<content::BrowserPpapiHostImpl> host_impl_;
// Handles filesystem requests from flash plugins. May be NULL.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 5bcb7b2..8bc872e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -114,6 +114,7 @@
#include "ipc/ipc_sync_channel.h"
#include "media/base/media_switches.h"
#include "net/url_request/url_request_context_getter.h"
+#include "ppapi/shared_impl/ppapi_switches.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gl/gl_switches.h"
#include "webkit/fileapi/sandbox_mount_point_provider.h"