Chromium Code Reviews| Index: ipc/ipc_channel.cc |
| diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc |
| index ac09c5ab1ef1d00b31c4f3a2e7b0a260673dbfbe..1f8746bd64a3333ab33fc5c4ad4b894b4b072be4 100644 |
| --- a/ipc/ipc_channel.cc |
| +++ b/ipc/ipc_channel.cc |
| @@ -4,21 +4,28 @@ |
| #include "ipc/ipc_channel.h" |
| +#if !defined(OS_NACL_SFI) |
| #include <limits> |
| #include "base/atomic_sequence_num.h" |
| #include "base/rand_util.h" |
| #include "base/strings/stringprintf.h" |
| +#endif // !defined(OS_NACL_SFI) |
|
Tom Sepez
2015/07/30 00:35:47
nit: maybe combine this with line 15
erikchen
2015/07/30 01:38:19
Moving the constructor to the header means these c
|
| +#if !defined(OS_NACL_SFI) |
| namespace { |
| // Global atomic used to guarantee channel IDs are unique. |
| base::StaticAtomicSequenceNumber g_last_id; |
| } // namespace |
| +#endif // !defined(OS_NACL_SFI) |
| namespace IPC { |
| +Channel::Channel() : attachment_broker_endpoint_(false) {} |
|
Tom Sepez
2015/07/30 00:35:47
Hmm. If this were in the header, could we avoid t
erikchen
2015/07/30 01:38:19
Good suggestion! Done.
|
| + |
| +#if !defined(OS_NACL_SFI) |
| // static |
| std::string Channel::GenerateUniqueRandomChannelID() { |
| // Note: the string must start with the current process id, this is how |
| @@ -40,5 +47,6 @@ std::string Channel::GenerateUniqueRandomChannelID() { |
| g_last_id.GetNext(), |
| base::RandInt(0, std::numeric_limits<int32>::max())); |
| } |
| +#endif // !defined(OS_NACL_SFI) |
| } // namespace IPC |