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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 10984094: Hook up PpapiPermissions in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
Index: content/browser/ppapi_plugin_process_host.cc
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 804274451a025b7ea4eb8864400d3f9242e28a38..bb27c8d094d0bbee8445e193d97b0dd047e80d2d 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++)
« no previous file with comments | « content/browser/ppapi_plugin_process_host.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698