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

Unified Diff: ipc/ipc_channel.cc

Issue 1269553003: ipc: Clean up interface of attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update BUILD.gn Created 5 years, 5 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
« ipc/ipc.gypi ('K') | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_nacl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« ipc/ipc.gypi ('K') | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_nacl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698