summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/plugin_channel.cc
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-16 21:36:44 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-16 21:36:44 +0000
commitc84a78578ea53490282bfb128fd844b120f926b5 (patch)
tree5bd1d8218ecf5d7863b33b3873a100386f61a96e /chrome/plugin/plugin_channel.cc
parentca11e335df5305cdb46cfa8f27091cf9d70fb5b6 (diff)
downloadchromium_src-c84a78578ea53490282bfb128fd844b120f926b5.zip
chromium_src-c84a78578ea53490282bfb128fd844b120f926b5.tar.gz
chromium_src-c84a78578ea53490282bfb128fd844b120f926b5.tar.bz2
Gears File Drag Drop
r24899 now keys the child security policy database based on renderer id, rather than renderer process id. Update gears drag drop to use the renderer id for the file policy access checks. This is a clone for submission of of noel's original CL http://codereview.chromium.org/195079 BUG=7995 Review URL: http://codereview.chromium.org/196145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/plugin_channel.cc')
-rw-r--r--chrome/plugin/plugin_channel.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc
index c813e4c..f852a21 100644
--- a/chrome/plugin/plugin_channel.cc
+++ b/chrome/plugin/plugin_channel.cc
@@ -33,16 +33,23 @@ PluginChannel* PluginChannel::GetPluginChannel(int renderer_id,
std::string channel_name = StringPrintf(
"%d.r%d", base::GetCurrentProcId(), renderer_id);
- return static_cast<PluginChannel*>(PluginChannelBase::GetChannel(
- channel_name,
- IPC::Channel::MODE_SERVER,
- ClassFactory,
- ipc_message_loop,
- false));
+ PluginChannel* channel =
+ static_cast<PluginChannel*>(PluginChannelBase::GetChannel(
+ channel_name,
+ IPC::Channel::MODE_SERVER,
+ ClassFactory,
+ ipc_message_loop,
+ false));
+
+ if (channel)
+ channel->renderer_id_ = renderer_id;
+
+ return channel;
}
PluginChannel::PluginChannel()
: renderer_handle_(0),
+ renderer_id_(-1),
#if defined(OS_POSIX)
renderer_fd_(-1),
#endif