diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_channel_posix.cc | 6 | ||||
-rw-r--r-- | ipc/ipc_channel_posix_unittest.cc | 15 | ||||
-rw-r--r-- | ipc/ipc_channel_unittest.cc | 6 | ||||
-rw-r--r-- | ipc/ipc_channel_win.cc | 3 | ||||
-rw-r--r-- | ipc/ipc_fuzzing_tests.cc | 27 | ||||
-rw-r--r-- | ipc/ipc_logging.cc | 3 | ||||
-rw-r--r-- | ipc/ipc_message.cc | 8 | ||||
-rw-r--r-- | ipc/ipc_message.h | 19 | ||||
-rw-r--r-- | ipc/ipc_message_macros.h | 12 | ||||
-rw-r--r-- | ipc/ipc_message_unittest.cc | 8 | ||||
-rw-r--r-- | ipc/ipc_message_utils_unittest.cc | 7 | ||||
-rw-r--r-- | ipc/ipc_perftests.cc | 8 | ||||
-rw-r--r-- | ipc/ipc_send_fds_test.cc | 6 | ||||
-rw-r--r-- | ipc/ipc_sync_message.cc | 6 | ||||
-rw-r--r-- | ipc/ipc_sync_message.h | 2 |
15 files changed, 52 insertions, 84 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc index a74178a..5b57100 100644 --- a/ipc/ipc_channel_posix.cc +++ b/ipc/ipc_channel_posix.cc @@ -745,8 +745,7 @@ int Channel::ChannelImpl::GetHelloMessageProcId() { void Channel::ChannelImpl::QueueHelloMessage() { // Create the Hello message scoped_ptr<Message> msg(new Message(MSG_ROUTING_NONE, - HELLO_MESSAGE_TYPE, - IPC::Message::PRIORITY_NORMAL)); + HELLO_MESSAGE_TYPE)); if (!msg->WriteInt(GetHelloMessageProcId())) { NOTREACHED() << "Unable to pickle hello message proc id"; } @@ -939,8 +938,7 @@ void Channel::ChannelImpl::QueueCloseFDMessage(int fd, int hops) { case 2: { // Create the message scoped_ptr<Message> msg(new Message(MSG_ROUTING_NONE, - CLOSE_FD_MESSAGE_TYPE, - IPC::Message::PRIORITY_NORMAL)); + CLOSE_FD_MESSAGE_TYPE)); if (!msg->WriteInt(hops - 1) || !msg->WriteInt(fd)) { NOTREACHED() << "Unable to pickle close fd."; } diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc index 66ddeb2..3a00716 100644 --- a/ipc/ipc_channel_posix_unittest.cc +++ b/ipc/ipc_channel_posix_unittest.cc @@ -244,9 +244,8 @@ TEST_F(IPCChannelPosixTest, AdvancedConnected) { SpinRunLoop(TestTimeouts::action_max_timeout()); ASSERT_EQ(IPCChannelPosixTestListener::CONNECTED, listener.status()); ASSERT_TRUE(channel.HasAcceptedConnection()); - IPC::Message* message = new IPC::Message(0, // routing_id - kQuitMessage, // message type - IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(0, /* routing_id */ + kQuitMessage /* message type */); channel.Send(message); SpinRunLoop(TestTimeouts::action_timeout()); int exit_code = 0; @@ -283,9 +282,8 @@ TEST_F(IPCChannelPosixTest, ResetState) { SpinRunLoop(TestTimeouts::action_max_timeout()); ASSERT_EQ(IPCChannelPosixTestListener::CONNECTED, listener.status()); ASSERT_TRUE(channel.HasAcceptedConnection()); - IPC::Message* message = new IPC::Message(0, // routing_id - kQuitMessage, // message type - IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(0, /* routing_id */ + kQuitMessage /* message type */); channel.Send(message); SpinRunLoop(TestTimeouts::action_timeout()); EXPECT_TRUE(base::KillProcess(handle, 0, false)); @@ -342,9 +340,8 @@ TEST_F(IPCChannelPosixTest, MultiConnection) { EXPECT_EQ(exit_code, 0); ASSERT_EQ(IPCChannelPosixTestListener::DENIED, listener.status()); ASSERT_TRUE(channel.HasAcceptedConnection()); - IPC::Message* message = new IPC::Message(0, // routing_id - kQuitMessage, // message type - IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(0, /* routing_id */ + kQuitMessage /* message type */); channel.Send(message); SpinRunLoop(TestTimeouts::action_timeout()); EXPECT_TRUE(base::WaitForExitCode(handle, &exit_code)); diff --git a/ipc/ipc_channel_unittest.cc b/ipc/ipc_channel_unittest.cc index eea432a..ead623e 100644 --- a/ipc/ipc_channel_unittest.cc +++ b/ipc/ipc_channel_unittest.cc @@ -23,9 +23,7 @@ const size_t kLongMessageStringNumBytes = 50000; static void Send(IPC::Sender* sender, const char* text) { static int message_index = 0; - IPC::Message* message = new IPC::Message(0, - 2, - IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(0, 2); message->WriteInt(message_index++); message->WriteString(std::string(text)); @@ -94,7 +92,7 @@ TEST_F(IPCChannelTest, BasicMessageTest) { std::string v2("foobar"); std::wstring v3(L"hello world"); - IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); + IPC::Message m(0, 1); EXPECT_TRUE(m.WriteInt(v1)); EXPECT_TRUE(m.WriteString(v2)); EXPECT_TRUE(m.WriteWString(v3)); diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc index 8c08500..d56b113 100644 --- a/ipc/ipc_channel_win.cc +++ b/ipc/ipc_channel_win.cc @@ -269,8 +269,7 @@ bool Channel::ChannelImpl::CreatePipe(const IPC::ChannelHandle &channel_handle, // Create the Hello message to be sent when Connect is called scoped_ptr<Message> m(new Message(MSG_ROUTING_NONE, - HELLO_MESSAGE_TYPE, - IPC::Message::PRIORITY_NORMAL)); + HELLO_MESSAGE_TYPE)); // Don't send the secret to the untrusted process, and don't send a secret // if the value is zero (for IPC backwards compatability). diff --git a/ipc/ipc_fuzzing_tests.cc b/ipc/ipc_fuzzing_tests.cc index 3d2d497..07ff8d9 100644 --- a/ipc/ipc_fuzzing_tests.cc +++ b/ipc/ipc_fuzzing_tests.cc @@ -38,7 +38,7 @@ TEST(IPCMessageIntegrity, ReadBeyondBufferStr) { //This was BUG 984408. uint32 v1 = kuint32max - 1; int v2 = 666; - IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); + IPC::Message m(0, 1); EXPECT_TRUE(m.WriteInt(v1)); EXPECT_TRUE(m.WriteInt(v2)); @@ -51,7 +51,7 @@ TEST(IPCMessageIntegrity, ReadBeyondBufferWStr) { //This was BUG 984408. uint32 v1 = kuint32max - 1; int v2 = 777; - IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); + IPC::Message m(0, 1); EXPECT_TRUE(m.WriteInt(v1)); EXPECT_TRUE(m.WriteInt(v2)); @@ -62,7 +62,7 @@ TEST(IPCMessageIntegrity, ReadBeyondBufferWStr) { TEST(IPCMessageIntegrity, ReadBytesBadIterator) { // This was BUG 1035467. - IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); + IPC::Message m(0, 1); EXPECT_TRUE(m.WriteInt(1)); EXPECT_TRUE(m.WriteInt(2)); @@ -75,7 +75,7 @@ TEST(IPCMessageIntegrity, ReadVectorNegativeSize) { // A slight variation of BUG 984408. Note that the pickling of vector<char> // has a specialized template which is not vulnerable to this bug. So here // try to hit the non-specialized case vector<P>. - IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); + IPC::Message m(0, 1); EXPECT_TRUE(m.WriteInt(-1)); // This is the count of elements. EXPECT_TRUE(m.WriteInt(1)); EXPECT_TRUE(m.WriteInt(2)); @@ -89,7 +89,7 @@ TEST(IPCMessageIntegrity, ReadVectorNegativeSize) { TEST(IPCMessageIntegrity, ReadVectorTooLarge1) { // This was BUG 1006367. This is the large but positive length case. Again // we try to hit the non-specialized case vector<P>. - IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); + IPC::Message m(0, 1); EXPECT_TRUE(m.WriteInt(0x21000003)); // This is the count of elements. EXPECT_TRUE(m.WriteInt64(1)); EXPECT_TRUE(m.WriteInt64(2)); @@ -103,7 +103,7 @@ TEST(IPCMessageIntegrity, ReadVectorTooLarge2) { // This was BUG 1006367. This is the large but positive with an additional // integer overflow when computing the actual byte size. Again we try to hit // the non-specialized case vector<P>. - IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); + IPC::Message m(0, 1); EXPECT_TRUE(m.WriteInt(0x71000000)); // This is the count of elements. EXPECT_TRUE(m.WriteInt64(1)); EXPECT_TRUE(m.WriteInt64(2)); @@ -164,8 +164,7 @@ class FuzzerServerListener : public SimpleListener { } bool RoundtripAckReply(int routing, uint32 type_id, int reply) { - IPC::Message* message = new IPC::Message(routing, type_id, - IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(routing, type_id); message->WriteInt(reply + 1); message->WriteInt(reply); return other_->Send(message); @@ -298,8 +297,7 @@ TEST_F(IPCFuzzingTest, MsgBadPayloadShort) { ASSERT_TRUE(ConnectChannel()); ASSERT_TRUE(StartClient()); - IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID, - IPC::Message::PRIORITY_NORMAL); + IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID); msg->WriteInt(666); sender()->Send(msg); EXPECT_TRUE(listener.ExpectMsgNotHandled(MsgClassIS::ID)); @@ -326,8 +324,7 @@ TEST_F(IPCFuzzingTest, MsgBadPayloadArgs) { ASSERT_TRUE(ConnectChannel()); ASSERT_TRUE(StartClient()); - IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassSI::ID, - IPC::Message::PRIORITY_NORMAL); + IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassSI::ID); msg->WriteWString(L"d"); msg->WriteInt(0); msg->WriteInt(0x65); // Extra argument. @@ -393,14 +390,12 @@ TEST_F(IPCFuzzingTest, MsgMapExMacro) { #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) // Test a bad message. - msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassSI::ID, - IPC::Message::PRIORITY_NORMAL); + msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassSI::ID); msg->WriteInt(2); EXPECT_FALSE(server.OnMessageReceived(*msg)); delete msg; - msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID, - IPC::Message::PRIORITY_NORMAL); + msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID); msg->WriteInt(0x64); msg->WriteInt(0x32); EXPECT_FALSE(server.OnMessageReceived(*msg)); diff --git a/ipc/ipc_logging.cc b/ipc/ipc_logging.cc index 65d8890..40f0300 100644 --- a/ipc/ipc_logging.cc +++ b/ipc/ipc_logging.cc @@ -96,8 +96,7 @@ void Logging::OnSendLogs() { if (!sender_) return; - Message* msg = new Message( - MSG_ROUTING_CONTROL, IPC_LOGGING_ID, Message::PRIORITY_NORMAL); + Message* msg = new Message(MSG_ROUTING_CONTROL, IPC_LOGGING_ID); WriteParam(msg, queued_logs_); queued_logs_.clear(); sender_->Send(msg); diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc index cf3a65e..b1eaaae 100644 --- a/ipc/ipc_message.cc +++ b/ipc/ipc_message.cc @@ -50,12 +50,11 @@ Message::Message() InitLoggingVariables(); } -Message::Message(int32 routing_id, uint32 type, PriorityValue priority) +Message::Message(int32 routing_id, uint32 type) : Pickle(sizeof(Header)) { header()->routing = routing_id; header()->type = type; - DCHECK((priority & 0xffffff00) == 0); - header()->flags = priority | GetRefNumUpper24(); + header()->flags = GetRefNumUpper24(); #if defined(OS_POSIX) header()->num_fds = 0; header()->pad = 0; @@ -63,7 +62,8 @@ Message::Message(int32 routing_id, uint32 type, PriorityValue priority) InitLoggingVariables(); } -Message::Message(const char* data, int data_len) : Pickle(data, data_len) { +Message::Message(const char* data, size_t data_len) + : Pickle(data, data_len) { InitLoggingVariables(); } diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h index 4209016..c071703 100644 --- a/ipc/ipc_message.h +++ b/ipc/ipc_message.h @@ -34,17 +34,11 @@ struct LogData; class IPC_EXPORT Message : public Pickle { public: - enum PriorityValue { - PRIORITY_LOW = 1, - PRIORITY_NORMAL, - PRIORITY_HIGH - }; - // Bit values used in the flags field. // Upper 24 bits of flags store a reference number, so this enum is limited to // 8 bits. enum { - PRIORITY_MASK = 0x03, // Low 2 bits of store the priority value. + UNUSED = 0x03, // Low 2 bits are not used. SYNC_BIT = 0x04, REPLY_BIT = 0x08, REPLY_ERROR_BIT = 0x10, @@ -57,22 +51,17 @@ class IPC_EXPORT Message : public Pickle { Message(); - // Initialize a message with a user-defined type, priority value, and - // destination WebView ID. - Message(int32 routing_id, uint32 type, PriorityValue priority); + // Initialize a message with routing ID and a user-defined type. + Message(int32 routing_id, uint32 type); // Initializes a message from a const block of data. The data is not copied; // instead the data is merely referenced by this message. Only const methods // should be used on the message when initialized this way. - Message(const char* data, int data_len); + Message(const char* data, size_t data_len); Message(const Message& other); Message& operator=(const Message& other); - PriorityValue priority() const { - return static_cast<PriorityValue>(header()->flags & PRIORITY_MASK); - } - // True if this is a synchronous message. void set_sync() { header()->flags |= SYNC_BIT; diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index ea8f7a8..e9f54e2 100644 --- a/ipc/ipc_message_macros.h +++ b/ipc/ipc_message_macros.h @@ -614,7 +614,7 @@ public: \ typedef IPC::Message Schema; \ enum { ID = IPC_MESSAGE_ID() }; \ - msg_class() : IPC::Message(MSG_ROUTING_CONTROL, ID, PRIORITY_NORMAL) {} \ + msg_class() : IPC::Message(MSG_ROUTING_CONTROL, ID) {} \ static void Log(std::string* name, const Message* msg, std::string* l); \ }; @@ -624,7 +624,7 @@ typedef IPC::Message Schema; \ enum { ID = IPC_MESSAGE_ID() }; \ msg_class(int32 routing_id) \ - : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ + : IPC::Message(routing_id, ID) {} \ static void Log(std::string* name, const Message* msg, std::string* l); \ }; @@ -713,7 +713,7 @@ #define IPC_ASYNC_CONTROL_IMPL(msg_class, in_cnt, out_cnt, in_list, out_list) \ msg_class::msg_class(IPC_TYPE_IN_##in_cnt in_list) : \ - IPC::Message(MSG_ROUTING_CONTROL, ID, PRIORITY_NORMAL) { \ + IPC::Message(MSG_ROUTING_CONTROL, ID) { \ Schema::Write(this, IPC_NAME_IN_##in_cnt in_list); \ } \ msg_class::~msg_class() {} \ @@ -724,7 +724,7 @@ #define IPC_ASYNC_ROUTED_IMPL(msg_class, in_cnt, out_cnt, in_list, out_list) \ msg_class::msg_class(int32 routing_id IPC_COMMA_##in_cnt \ IPC_TYPE_IN_##in_cnt in_list) : \ - IPC::Message(routing_id, ID, PRIORITY_NORMAL) { \ + IPC::Message(routing_id, ID) { \ Schema::Write(this, IPC_NAME_IN_##in_cnt in_list); \ } \ msg_class::~msg_class() {} \ @@ -736,7 +736,7 @@ msg_class::msg_class(IPC_TYPE_IN_##in_cnt in_list \ IPC_COMMA_AND_##in_cnt(IPC_COMMA_##out_cnt) \ IPC_TYPE_OUT_##out_cnt out_list) : \ - IPC::SyncMessage(MSG_ROUTING_CONTROL, ID, PRIORITY_NORMAL, \ + IPC::SyncMessage(MSG_ROUTING_CONTROL, ID, \ new IPC::ParamDeserializer<Schema::ReplyParam>( \ IPC_NAME_OUT_##out_cnt out_list)) { \ Schema::Write(this, IPC_NAME_IN_##in_cnt in_list); \ @@ -756,7 +756,7 @@ IPC_TYPE_IN_##in_cnt in_list \ IPC_COMMA_AND_##in_cnt(IPC_COMMA_##out_cnt) \ IPC_TYPE_OUT_##out_cnt out_list) : \ - IPC::SyncMessage(routing_id, ID, PRIORITY_NORMAL, \ + IPC::SyncMessage(routing_id, ID, \ new IPC::ParamDeserializer<Schema::ReplyParam>( \ IPC_NAME_OUT_##out_cnt out_list)) { \ Schema::Write(this, IPC_NAME_IN_##in_cnt in_list); \ diff --git a/ipc/ipc_message_unittest.cc b/ipc/ipc_message_unittest.cc index 971314a..e5215ce3 100644 --- a/ipc/ipc_message_unittest.cc +++ b/ipc/ipc_message_unittest.cc @@ -19,7 +19,7 @@ TEST(IPCMessageTest, ListValue) { input.Set(1, new base::StringValue("forty")); input.Set(2, base::Value::CreateNullValue()); - IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); + IPC::Message msg(1, 2); IPC::WriteParam(&msg, input); base::ListValue output; @@ -29,7 +29,7 @@ TEST(IPCMessageTest, ListValue) { EXPECT_TRUE(input.Equals(&output)); // Also test the corrupt case. - IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL); + IPC::Message bad_msg(1, 2); bad_msg.WriteInt(99); iter = PickleIterator(bad_msg); EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output)); @@ -54,7 +54,7 @@ TEST(IPCMessageTest, DictionaryValue) { input.Set("dict", subdict.release()); - IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); + IPC::Message msg(1, 2); IPC::WriteParam(&msg, input); base::DictionaryValue output; @@ -64,7 +64,7 @@ TEST(IPCMessageTest, DictionaryValue) { EXPECT_TRUE(input.Equals(&output)); // Also test the corrupt case. - IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL); + IPC::Message bad_msg(1, 2); bad_msg.WriteInt(99); iter = PickleIterator(bad_msg); EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output)); diff --git a/ipc/ipc_message_utils_unittest.cc b/ipc/ipc_message_utils_unittest.cc index 2156eeb..9df1bef 100644 --- a/ipc/ipc_message_utils_unittest.cc +++ b/ipc/ipc_message_utils_unittest.cc @@ -16,16 +16,14 @@ TEST(IPCMessageUtilsTest, NestedMessages) { int32 nested_routing = 12; uint32 nested_type = 78; int nested_content = 456789; - Message::PriorityValue nested_priority = Message::PRIORITY_HIGH; - Message nested_msg(nested_routing, nested_type, nested_priority); + Message nested_msg(nested_routing, nested_type); nested_msg.set_sync(); ParamTraits<int>::Write(&nested_msg, nested_content); // Outer message contains the nested one as its parameter. int32 outer_routing = 91; uint32 outer_type = 88; - Message::PriorityValue outer_priority = Message::PRIORITY_NORMAL; - Message outer_msg(outer_routing, outer_type, outer_priority); + Message outer_msg(outer_routing, outer_type); ParamTraits<Message>::Write(&outer_msg, nested_msg); // Read back the nested message. @@ -36,7 +34,6 @@ TEST(IPCMessageUtilsTest, NestedMessages) { // Verify nested message headers. EXPECT_EQ(nested_msg.routing_id(), result_msg.routing_id()); EXPECT_EQ(nested_msg.type(), result_msg.type()); - EXPECT_EQ(nested_msg.priority(), result_msg.priority()); EXPECT_EQ(nested_msg.flags(), result_msg.flags()); // Verify nested message content diff --git a/ipc/ipc_perftests.cc b/ipc/ipc_perftests.cc index e7eeab9..8b651e2 100644 --- a/ipc/ipc_perftests.cc +++ b/ipc/ipc_perftests.cc @@ -122,7 +122,7 @@ class ChannelReflectorListener : public IPC::Listener { base::TimeTicks::FromInternalValue(time_internal), now); } - IPC::Message* msg = new IPC::Message(0, 2, IPC::Message::PRIORITY_NORMAL); + IPC::Message* msg = new IPC::Message(0, 2); msg->WriteInt64(base::TimeTicks::Now().ToInternalValue()); msg->WriteInt(msgid); msg->WriteString(payload); @@ -201,7 +201,7 @@ class PerformanceChannelListener : public IPC::Listener { } } - IPC::Message* msg = new IPC::Message(0, 2, IPC::Message::PRIORITY_NORMAL); + IPC::Message* msg = new IPC::Message(0, 2); msg->WriteInt64(base::TimeTicks::Now().ToInternalValue()); msg->WriteInt(count_down_); msg->WriteString(payload_); @@ -239,7 +239,7 @@ TEST_F(IPCChannelPerfTest, Performance) { // This initial message will kick-start the ping-pong of messages. IPC::Message* message = - new IPC::Message(0, 2, IPC::Message::PRIORITY_NORMAL); + new IPC::Message(0, 2); message->WriteInt64(base::TimeTicks::Now().ToInternalValue()); message->WriteInt(-1); message->WriteString("hello"); @@ -252,7 +252,7 @@ TEST_F(IPCChannelPerfTest, Performance) { } // Send quit message. - IPC::Message* message = new IPC::Message(0, 2, IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(0, 2); message->WriteInt64(base::TimeTicks::Now().ToInternalValue()); message->WriteInt(-1); message->WriteString("quit"); diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc index 20c3ed5..7e36e73 100644 --- a/ipc/ipc_send_fds_test.cc +++ b/ipc/ipc_send_fds_test.cc @@ -106,8 +106,7 @@ class IPCSendFdsTest : public IPCTestBase { ASSERT_GE(fd, 0); base::FileDescriptor descriptor(fd, true); - IPC::Message* message = - new IPC::Message(0, 3, IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(0, 3); IPC::ParamTraits<base::FileDescriptor>::Write(message, descriptor); ASSERT_TRUE(sender()->Send(message)); } @@ -280,8 +279,7 @@ class PipeChannelHelper { ASSERT_GE(fd, 0); base::FileDescriptor descriptor(fd, true); - IPC::Message* message = - new IPC::Message(0, 3, IPC::Message::PRIORITY_NORMAL); + IPC::Message* message = new IPC::Message(0, 3); IPC::ParamTraits<base::FileDescriptor>::Write(message, descriptor); ASSERT_TRUE(in->Send(message)); } diff --git a/ipc/ipc_sync_message.cc b/ipc/ipc_sync_message.cc index 9e3acf8..5226878 100644 --- a/ipc/ipc_sync_message.cc +++ b/ipc/ipc_sync_message.cc @@ -39,9 +39,8 @@ namespace IPC { SyncMessage::SyncMessage( int32 routing_id, uint32 type, - PriorityValue priority, MessageReplyDeserializer* deserializer) - : Message(routing_id, type, priority), + : Message(routing_id, type), deserializer_(deserializer), pump_messages_event_(NULL) { @@ -96,8 +95,7 @@ int SyncMessage::GetMessageId(const Message& msg) { Message* SyncMessage::GenerateReply(const Message* msg) { DCHECK(msg->is_sync()); - Message* reply = new Message(msg->routing_id(), IPC_REPLY_ID, - msg->priority()); + Message* reply = new Message(msg->routing_id(), IPC_REPLY_ID); reply->set_reply(); SyncHeader header; diff --git a/ipc/ipc_sync_message.h b/ipc/ipc_sync_message.h index a741591..21db2e3 100644 --- a/ipc/ipc_sync_message.h +++ b/ipc/ipc_sync_message.h @@ -23,7 +23,7 @@ class MessageReplyDeserializer; class IPC_EXPORT SyncMessage : public Message { public: - SyncMessage(int32 routing_id, uint32 type, PriorityValue priority, + SyncMessage(int32 routing_id, uint32 type, MessageReplyDeserializer* deserializer); virtual ~SyncMessage(); |