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

Unified Diff: ipc/ipc_message_macros.h

Issue 1159553007: Move Tuple to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « extensions/utility/unpacker.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_macros.h
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index e0e16d55925c949c520644e0300ae3e855431fd0..3f7574fd31ae0034323273b9aa7637f3f99150cc 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -457,7 +457,7 @@
void (T::*func)(P*, TA)) { \
Schema::Param p; \
if (Read(msg, &p)) { \
- (obj->*func)(parameter, get<0>(p)); \
+ (obj->*func)(parameter, base::get<0>(p)); \
return true; \
} \
return false; \
@@ -469,7 +469,7 @@
void (T::*func)(P*, TA, TB)) { \
Schema::Param p; \
if (Read(msg, &p)) { \
- (obj->*func)(parameter, get<0>(p), get<1>(p)); \
+ (obj->*func)(parameter, base::get<0>(p), base::get<1>(p)); \
return true; \
} \
return false; \
@@ -481,7 +481,8 @@
void (T::*func)(P*, TA, TB, TC)) { \
Schema::Param p; \
if (Read(msg, &p)) { \
- (obj->*func)(parameter, get<0>(p), get<1>(p), get<2>(p)); \
+ (obj->*func)(parameter, base::get<0>(p), base::get<1>(p), \
+ base::get<2>(p)); \
return true; \
} \
return false; \
@@ -494,7 +495,8 @@
void (T::*func)(P*, TA, TB, TC, TD)) { \
Schema::Param p; \
if (Read(msg, &p)) { \
- (obj->*func)(parameter, get<0>(p), get<1>(p), get<2>(p), get<3>(p)); \
+ (obj->*func)(parameter, base::get<0>(p), base::get<1>(p), \
+ base::get<2>(p), base::get<3>(p)); \
return true; \
} \
return false; \
@@ -507,8 +509,8 @@
void (T::*func)(P*, TA, TB, TC, TD, TE)) { \
Schema::Param p; \
if (Read(msg, &p)) { \
- (obj->*func)(parameter, get<0>(p), get<1>(p), get<2>(p), get<3>(p), \
- get<4>(p)); \
+ (obj->*func)(parameter, base::get<0>(p), base::get<1>(p), \
+ base::get<2>(p), base::get<3>(p), base::get<4>(p)); \
return true; \
} \
return false; \
@@ -636,7 +638,7 @@
static bool ReadSendParam(const Message* msg, Schema::SendParam* p); \
static bool ReadReplyParam( \
const Message* msg, \
- TupleTypes<ReplyParam>::ValueTuple* p); \
+ base::TupleTypes<ReplyParam>::ValueTuple* p); \
static void Log(std::string* name, const Message* msg, std::string* l); \
IPC_SYNC_MESSAGE_METHODS_##out_cnt \
};
@@ -658,7 +660,7 @@
static bool ReadSendParam(const Message* msg, Schema::SendParam* p); \
static bool ReadReplyParam( \
const Message* msg, \
- TupleTypes<ReplyParam>::ValueTuple* p); \
+ base::TupleTypes<ReplyParam>::ValueTuple* p); \
static void Log(std::string* name, const Message* msg, std::string* l); \
IPC_SYNC_MESSAGE_METHODS_##out_cnt \
};
@@ -711,8 +713,9 @@
bool msg_class::ReadSendParam(const Message* msg, Schema::SendParam* p) { \
return Schema::ReadSendParam(msg, p); \
} \
- bool msg_class::ReadReplyParam(const Message* msg, \
- TupleTypes<ReplyParam>::ValueTuple* p) { \
+ bool msg_class::ReadReplyParam( \
+ const Message* msg, \
+ base::TupleTypes<ReplyParam>::ValueTuple* p) { \
return Schema::ReadReplyParam(msg, p); \
}
@@ -731,8 +734,9 @@
bool msg_class::ReadSendParam(const Message* msg, Schema::SendParam* p) { \
return Schema::ReadSendParam(msg, p); \
} \
- bool msg_class::ReadReplyParam(const Message* msg, \
- TupleTypes<ReplyParam>::ValueTuple* p) { \
+ bool msg_class::ReadReplyParam( \
+ const Message* msg, \
+ base::TupleTypes<ReplyParam>::ValueTuple* p) { \
return Schema::ReadReplyParam(msg, p); \
}
@@ -766,12 +770,12 @@
if (!msg || !l) \
return; \
if (msg->is_sync()) { \
- TupleTypes<Schema::SendParam>::ValueTuple p; \
+ base::TupleTypes<Schema::SendParam>::ValueTuple p; \
if (Schema::ReadSendParam(msg, &p)) \
IPC::LogParam(p, l); \
AddOutputParamsToLog(msg, l); \
} else { \
- TupleTypes<Schema::ReplyParam>::ValueTuple p; \
+ base::TupleTypes<Schema::ReplyParam>::ValueTuple p; \
if (Schema::ReadReplyParam(msg, &p)) \
IPC::LogParam(p, l); \
} \
@@ -816,33 +820,38 @@
#define IPC_TYPE_OUT_1(t1) t1* arg6
#define IPC_TYPE_OUT_2(t1, t2) t1* arg6, t2* arg7
#define IPC_TYPE_OUT_3(t1, t2, t3) t1* arg6, t2* arg7, t3* arg8
-#define IPC_TYPE_OUT_4(t1, t2, t3, t4) t1* arg6, t2* arg7, t3* arg8, t4* arg9
-
-#define IPC_TUPLE_IN_0() Tuple<>
-#define IPC_TUPLE_IN_1(t1) Tuple<t1>
-#define IPC_TUPLE_IN_2(t1, t2) Tuple<t1, t2>
-#define IPC_TUPLE_IN_3(t1, t2, t3) Tuple<t1, t2, t3>
-#define IPC_TUPLE_IN_4(t1, t2, t3, t4) Tuple<t1, t2, t3, t4>
-#define IPC_TUPLE_IN_5(t1, t2, t3, t4, t5) Tuple<t1, t2, t3, t4, t5>
-
-#define IPC_TUPLE_OUT_0() Tuple<>
-#define IPC_TUPLE_OUT_1(t1) Tuple<t1&>
-#define IPC_TUPLE_OUT_2(t1, t2) Tuple<t1&, t2&>
-#define IPC_TUPLE_OUT_3(t1, t2, t3) Tuple<t1&, t2&, t3&>
-#define IPC_TUPLE_OUT_4(t1, t2, t3, t4) Tuple<t1&, t2&, t3&, t4&>
-
-#define IPC_NAME_IN_0() MakeTuple()
-#define IPC_NAME_IN_1(t1) MakeRefTuple(arg1)
-#define IPC_NAME_IN_2(t1, t2) MakeRefTuple(arg1, arg2)
-#define IPC_NAME_IN_3(t1, t2, t3) MakeRefTuple(arg1, arg2, arg3)
-#define IPC_NAME_IN_4(t1, t2, t3, t4) MakeRefTuple(arg1, arg2, arg3, arg4)
-#define IPC_NAME_IN_5(t1, t2, t3, t4, t5) MakeRefTuple(arg1, arg2, arg3, arg4, arg5)
-
-#define IPC_NAME_OUT_0() MakeTuple()
-#define IPC_NAME_OUT_1(t1) MakeRefTuple(*arg6)
-#define IPC_NAME_OUT_2(t1, t2) MakeRefTuple(*arg6, *arg7)
-#define IPC_NAME_OUT_3(t1, t2, t3) MakeRefTuple(*arg6, *arg7, *arg8)
-#define IPC_NAME_OUT_4(t1, t2, t3, t4) MakeRefTuple(*arg6, *arg7, *arg8, *arg9)
+#define IPC_TYPE_OUT_4(t1, t2, t3, t4) t1* arg6, t2* arg7, t3* arg8, \
+ t4* arg9
+
+#define IPC_TUPLE_IN_0() base::Tuple<>
+#define IPC_TUPLE_IN_1(t1) base::Tuple<t1>
+#define IPC_TUPLE_IN_2(t1, t2) base::Tuple<t1, t2>
+#define IPC_TUPLE_IN_3(t1, t2, t3) base::Tuple<t1, t2, t3>
+#define IPC_TUPLE_IN_4(t1, t2, t3, t4) base::Tuple<t1, t2, t3, t4>
+#define IPC_TUPLE_IN_5(t1, t2, t3, t4, t5) base::Tuple<t1, t2, t3, t4, t5>
+
+#define IPC_TUPLE_OUT_0() base::Tuple<>
+#define IPC_TUPLE_OUT_1(t1) base::Tuple<t1&>
+#define IPC_TUPLE_OUT_2(t1, t2) base::Tuple<t1&, t2&>
+#define IPC_TUPLE_OUT_3(t1, t2, t3) base::Tuple<t1&, t2&, t3&>
+#define IPC_TUPLE_OUT_4(t1, t2, t3, t4) base::Tuple<t1&, t2&, t3&, t4&>
+
+#define IPC_NAME_IN_0() base::MakeTuple()
+#define IPC_NAME_IN_1(t1) base::MakeRefTuple(arg1)
+#define IPC_NAME_IN_2(t1, t2) base::MakeRefTuple(arg1, arg2)
+#define IPC_NAME_IN_3(t1, t2, t3) base::MakeRefTuple(arg1, arg2, arg3)
+#define IPC_NAME_IN_4(t1, t2, t3, t4) base::MakeRefTuple(arg1, arg2, \
+ arg3, arg4)
+#define IPC_NAME_IN_5(t1, t2, t3, t4, t5) base::MakeRefTuple(arg1, arg2, \
+ arg3, arg4, arg5)
+
+#define IPC_NAME_OUT_0() base::MakeTuple()
+#define IPC_NAME_OUT_1(t1) base::MakeRefTuple(*arg6)
+#define IPC_NAME_OUT_2(t1, t2) base::MakeRefTuple(*arg6, *arg7)
+#define IPC_NAME_OUT_3(t1, t2, t3) base::MakeRefTuple(*arg6, *arg7, \
+ *arg8)
+#define IPC_NAME_OUT_4(t1, t2, t3, t4) base::MakeRefTuple(*arg6, *arg7, \
+ *arg8, *arg9)
// There are places where the syntax requires a comma if there are input args,
// if there are input args and output args, or if there are input args or
« no previous file with comments | « extensions/utility/unpacker.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698