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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 11722017: Use an explicit PID for duplicating Pepper handles rather than the Channel's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 | « content/browser/ppapi_plugin_process_host.h ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10aef1569598e391c507798896fc22e270a23cc2..d705e5744f176ede5d6be62f4e711e28e3bf40fb 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -284,18 +284,19 @@ bool PpapiPluginProcessHost::Init(const PepperPluginInfo& info) {
void PpapiPluginProcessHost::RequestPluginChannel(Client* client) {
base::ProcessHandle process_handle;
- int renderer_id;
- client->GetPpapiChannelInfo(&process_handle, &renderer_id);
+ int renderer_child_id;
+ client->GetPpapiChannelInfo(&process_handle, &renderer_child_id);
// We can't send any sync messages from the browser because it might lead to
// a hang. See the similar code in PluginProcessHost for more description.
PpapiMsg_CreateChannel* msg = new PpapiMsg_CreateChannel(
- renderer_id, client->OffTheRecord());
+ base::GetProcId(process_handle), renderer_child_id,
+ client->OffTheRecord());
msg->set_unblock(true);
if (Send(msg)) {
sent_requests_.push(client);
} else {
- client->OnPpapiChannelOpened(IPC::ChannelHandle(), 0);
+ client->OnPpapiChannelOpened(IPC::ChannelHandle(), base::kNullProcessId, 0);
}
}
@@ -347,12 +348,14 @@ void PpapiPluginProcessHost::CancelRequests() {
DVLOG(1) << "PpapiPluginProcessHost" << (is_broker_ ? "[broker]" : "")
<< "CancelRequests()";
for (size_t i = 0; i < pending_requests_.size(); i++) {
- pending_requests_[i]->OnPpapiChannelOpened(IPC::ChannelHandle(), 0);
+ pending_requests_[i]->OnPpapiChannelOpened(IPC::ChannelHandle(),
+ base::kNullProcessId, 0);
}
pending_requests_.clear();
while (!sent_requests_.empty()) {
- sent_requests_.front()->OnPpapiChannelOpened(IPC::ChannelHandle(), 0);
+ sent_requests_.front()->OnPpapiChannelOpened(IPC::ChannelHandle(),
+ base::kNullProcessId, 0);
sent_requests_.pop();
}
}
@@ -368,7 +371,9 @@ void PpapiPluginProcessHost::OnRendererPluginChannelCreated(
Client* client = sent_requests_.front();
sent_requests_.pop();
- client->OnPpapiChannelOpened(channel_handle, process_->GetData().id);
+ const ChildProcessData& data = process_->GetData();
+ client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
+ data.id);
}
} // namespace content
« no previous file with comments | « content/browser/ppapi_plugin_process_host.h ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698