summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.cc
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 00:35:01 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 00:35:01 +0000
commit21f977570e42b26a9c50da35bf8d12e44645371a (patch)
tree79d2c7ceb5dd24a3ddef8a02590a2786e6768b0e /ipc/ipc_channel.cc
parent8df26d4b2c07009cca88c4082bee5a4acff16a77 (diff)
downloadchromium_src-21f977570e42b26a9c50da35bf8d12e44645371a.zip
chromium_src-21f977570e42b26a9c50da35bf8d12e44645371a.tar.gz
chromium_src-21f977570e42b26a9c50da35bf8d12e44645371a.tar.bz2
Add untrusted NaCl build for PPAPI proxy.
This patch refactors ppapi_shared.gypi and ppapi_proxy.gypi into proper includes, adds ppapi_shared_untrusted and ppapi_proxy_untrusted .gyp files, and integrates them into the nacl_irt build (ppapi/native_client/native_client.gyp). In order to build without link errors, it includes our plugin side initialization of PluginDispatcher, and a PpapiPluginMain definition. When the 'build_ppapi_ipc_proxy_untrusted' gyp flag is set to '1', this will build a working NaCl IRT using the Chrome IPC proxy. BUG=116317 TEST=compiles, runs HelloWorld and GetURL SDK examples. Review URL: https://chromiumcodereview.appspot.com/10565015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel.cc')
-rw-r--r--ipc/ipc_channel.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc
index d81d73b..94e1cc4 100644
--- a/ipc/ipc_channel.cc
+++ b/ipc/ipc_channel.cc
@@ -30,16 +30,15 @@ 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
+ int process_id = base::GetCurrentProcId();
return base::StringPrintf("%d.%u.%d",
process_id,
g_last_id.GetNext(),
base::RandInt(0, std::numeric_limits<int32>::max()));
+#else
+ return std::string();
+#endif
}
} // namespace IPC