summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.cc
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-23 21:18:19 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-23 21:18:19 +0000
commitfe5d406f982a080ff3b8a503d6b487f16c812d48 (patch)
tree77595f2b8f7e136562deedba553339ea2028568b /ipc/ipc_channel.cc
parentde1d2f80e33170f57c942e4950b1a75d4056a127 (diff)
downloadchromium_src-fe5d406f982a080ff3b8a503d6b487f16c812d48.zip
chromium_src-fe5d406f982a080ff3b8a503d6b487f16c812d48.tar.gz
chromium_src-fe5d406f982a080ff3b8a503d6b487f16c812d48.tar.bz2
Add ipc_channel_nacl to the untrusted build and fix all compile/link errors.
ppapi_proxy_untrusted.gyp should now build with a single link error for main. BUG=116317 TEST=builds with a single link error for main(). Review URL: https://chromiumcodereview.appspot.com/10167024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133519 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel.cc')
-rw-r--r--ipc/ipc_channel.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc
index 5973f72..d81d73b 100644
--- a/ipc/ipc_channel.cc
+++ b/ipc/ipc_channel.cc
@@ -30,8 +30,14 @@ std::string Channel::GenerateUniqueRandomChannelID() {
// component. The strong random component prevents other processes from
// hijacking or squatting on predictable channel names.
+ int process_id;
+#if !defined(OS_NACL)
+ process_id = base::GetCurrentProcId();
+#else
+ process_id = 0;
+#endif
return base::StringPrintf("%d.%u.%d",
- base::GetCurrentProcId(),
+ process_id,
g_last_id.GetNext(),
base::RandInt(0, std::numeric_limits<int32>::max()));
}