diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 22:05:26 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 22:05:26 +0000 |
commit | b7f59e82e6325597b4a13a3f64e0c56d1520a5e6 (patch) | |
tree | 119368c241c931dd9122d3159e9bfc540d577807 /ipc | |
parent | 5c23e954bbd14f139cc82846d55cd0fba5e1a9de (diff) | |
download | chromium_src-b7f59e82e6325597b4a13a3f64e0c56d1520a5e6.zip chromium_src-b7f59e82e6325597b4a13a3f64e0c56d1520a5e6.tar.gz chromium_src-b7f59e82e6325597b4a13a3f64e0c56d1520a5e6.tar.bz2 |
Remove Message::Sender and Channel::Listener typedefs.
This patch fixes the remaining users to use the new names for these classes.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10698057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_channel.h | 9 | ||||
-rw-r--r-- | ipc/ipc_message.h | 9 | ||||
-rw-r--r-- | ipc/ipc_send_fds_test.cc | 2 | ||||
-rw-r--r-- | ipc/ipc_sync_channel.cc | 6 | ||||
-rw-r--r-- | ipc/ipc_sync_channel.h | 6 | ||||
-rw-r--r-- | ipc/ipc_test_sink.cc | 8 | ||||
-rw-r--r-- | ipc/ipc_test_sink.h | 8 | ||||
-rw-r--r-- | ipc/ipc_tests.cc | 8 | ||||
-rw-r--r-- | ipc/sync_socket_unittest.cc | 4 |
9 files changed, 25 insertions, 35 deletions
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h index ec87a7b..da87797 100644 --- a/ipc/ipc_channel.h +++ b/ipc/ipc_channel.h @@ -18,7 +18,8 @@ #include "ipc/ipc_message.h" #include "ipc/ipc_sender.h" -// TODO(brettw) remove this when the "typedef Sender" is removed below. +// TODO(brettw) remove this and update files that depend on this being included +// from here. #include "ipc/ipc_listener.h" namespace IPC { @@ -47,12 +48,6 @@ class IPC_EXPORT Channel : public Sender { friend class ChannelTest; public: - // IPC::Listener used to be IPC::Channel::Listener which prevented forward - // declarations. To keep existing code compiling, we provide this - // backwards-compatible definition. New code should use IPC::Listener. - // TODO(brettw) convert users of this and delete. - typedef IPC::Listener Listener; - // Flags to test modes enum ModeFlags { MODE_NO_FLAG = 0x0, diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h index 098a010..cbb23b0 100644 --- a/ipc/ipc_message.h +++ b/ipc/ipc_message.h @@ -12,7 +12,8 @@ #include "base/pickle.h" #include "ipc/ipc_export.h" -// TODO(brettw) remove this when the "typedef Sender" is removed below. +// TODO(brettw) remove this and update files that depend on this being included +// from here. #include "ipc/ipc_sender.h" // Ipc logging adds a dependency from the 'chrome' target on all ipc message @@ -42,12 +43,6 @@ struct LogData; class IPC_EXPORT Message : public Pickle { public: - // IPC::Sender used to be IPC::Message::Sender which prevented forward - // declarations. To keep existing code compiling, we provide this backwards- - // compatible definition. New code should use IPC::Sender. - // TODO(brettw) convert users of this and delete. - typedef IPC::Sender Sender; - enum PriorityValue { PRIORITY_LOW = 1, PRIORITY_NORMAL, diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc index 0f587c9a..05d9ae4 100644 --- a/ipc/ipc_send_fds_test.cc +++ b/ipc/ipc_send_fds_test.cc @@ -46,7 +46,7 @@ static void VerifyAndCloseDescriptor(int fd, ino_t inode_num) { ASSERT_EQ(inode_num, st.st_ino); } -class MyChannelDescriptorListener : public IPC::Channel::Listener { +class MyChannelDescriptorListener : public IPC::Listener { public: MyChannelDescriptorListener(ino_t expected_inode_num) : expected_inode_num_(expected_inode_num), diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc index b9dc2c5..26636e5 100644 --- a/ipc/ipc_sync_channel.cc +++ b/ipc/ipc_sync_channel.cc @@ -223,7 +223,7 @@ base::LazyInstance<base::ThreadLocalPointer<SyncChannel::ReceivedSyncMsgQueue> > LAZY_INSTANCE_INITIALIZER; SyncChannel::SyncContext::SyncContext( - Channel::Listener* listener, + Listener* listener, base::MessageLoopProxy* ipc_thread, WaitableEvent* shutdown_event) : ChannelProxy::Context(listener, ipc_thread), @@ -387,7 +387,7 @@ void SyncChannel::SyncContext::OnWaitableEventSignaled(WaitableEvent* event) { SyncChannel::SyncChannel( const IPC::ChannelHandle& channel_handle, Channel::Mode mode, - Channel::Listener* listener, + Listener* listener, base::MessageLoopProxy* ipc_message_loop, bool create_pipe_now, WaitableEvent* shutdown_event) @@ -398,7 +398,7 @@ SyncChannel::SyncChannel( } SyncChannel::SyncChannel( - Channel::Listener* listener, + Listener* listener, base::MessageLoopProxy* ipc_message_loop, WaitableEvent* shutdown_event) : ChannelProxy(new SyncContext(listener, ipc_message_loop, shutdown_event)), diff --git a/ipc/ipc_sync_channel.h b/ipc/ipc_sync_channel.h index 3157279..c6ebde1 100644 --- a/ipc/ipc_sync_channel.h +++ b/ipc/ipc_sync_channel.h @@ -70,7 +70,7 @@ class IPC_EXPORT SyncChannel : public ChannelProxy, // the channel will be initialized synchronously. SyncChannel(const IPC::ChannelHandle& channel_handle, Channel::Mode mode, - Channel::Listener* listener, + Listener* listener, base::MessageLoopProxy* ipc_message_loop, bool create_pipe_now, base::WaitableEvent* shutdown_event); @@ -78,7 +78,7 @@ class IPC_EXPORT SyncChannel : public ChannelProxy, // Creates an uninitialized sync channel. Call ChannelProxy::Init to // initialize the channel. This two-step setup allows message filters to be // added before any messages are sent or received. - SyncChannel(Channel::Listener* listener, + SyncChannel(Listener* listener, base::MessageLoopProxy* ipc_message_loop, base::WaitableEvent* shutdown_event); @@ -119,7 +119,7 @@ class IPC_EXPORT SyncChannel : public ChannelProxy, class SyncContext : public Context, public base::WaitableEventWatcher::Delegate { public: - SyncContext(Channel::Listener* listener, + SyncContext(Listener* listener, base::MessageLoopProxy* ipc_thread, base::WaitableEvent* shutdown_event); diff --git a/ipc/ipc_test_sink.cc b/ipc/ipc_test_sink.cc index 4404239..2dc8898 100644 --- a/ipc/ipc_test_sink.cc +++ b/ipc/ipc_test_sink.cc @@ -21,8 +21,8 @@ bool TestSink::Send(Message* message) { } bool TestSink::OnMessageReceived(const Message& msg) { - ObserverListBase<Channel::Listener>::Iterator it(filter_list_); - Channel::Listener* observer; + ObserverListBase<Listener>::Iterator it(filter_list_); + Listener* observer; while ((observer = it.GetNext()) != NULL) { if (observer->OnMessageReceived(msg)) return true; @@ -65,11 +65,11 @@ const Message* TestSink::GetUniqueMessageMatching(uint32 id) const { return &messages_[found_index]; } -void TestSink::AddFilter(Channel::Listener* filter) { +void TestSink::AddFilter(Listener* filter) { filter_list_.AddObserver(filter); } -void TestSink::RemoveFilter(Channel::Listener* filter) { +void TestSink::RemoveFilter(Listener* filter) { filter_list_.RemoveObserver(filter); } diff --git a/ipc/ipc_test_sink.h b/ipc/ipc_test_sink.h index 735fa1b..1cdac2a 100644 --- a/ipc/ipc_test_sink.h +++ b/ipc/ipc_test_sink.h @@ -53,7 +53,7 @@ class Message; // This can be useful if you need to wait for a particular message that will // be posted asynchronously. Example usage: // -// class MyListener : public IPC::Channel::Listener { +// class MyListener : public IPC::Listener { // public: // virtual bool OnMessageReceived(const IPC::Message& msg) { // <do something with the message> @@ -112,15 +112,15 @@ class TestSink : public Channel { // the filters, in the order they were added. If a filter returns true // from OnMessageReceived, subsequent filters will not receive the message // and the TestSink will not store it. - void AddFilter(Channel::Listener* filter); + void AddFilter(Listener* filter); // Removes the given filter from the TestSink. - void RemoveFilter(Channel::Listener* filter); + void RemoveFilter(Listener* filter); private: // The actual list of received messages. std::vector<Message> messages_; - ObserverList<Channel::Listener> filter_list_; + ObserverList<Listener> filter_list_; DISALLOW_COPY_AND_ASSIGN(TestSink); }; diff --git a/ipc/ipc_tests.cc b/ipc/ipc_tests.cc index fc2de57..5b23fa6 100644 --- a/ipc/ipc_tests.cc +++ b/ipc/ipc_tests.cc @@ -182,7 +182,7 @@ static void Send(IPC::Sender* sender, const char* text) { sender->Send(message); } -class MyChannelListener : public IPC::Channel::Listener { +class MyChannelListener : public IPC::Listener { public: virtual bool OnMessageReceived(const IPC::Message& message) { IPC::MessageIterator iter(message); @@ -329,7 +329,7 @@ TEST_F(IPCChannelTest, ChannelProxyTest) { thread.Stop(); } -class ChannelListenerWithOnConnectedSend : public IPC::Channel::Listener { +class ChannelListenerWithOnConnectedSend : public IPC::Listener { public: virtual void OnChannelConnected(int32 peer_pid) OVERRIDE { SendNextMessage(); @@ -439,7 +439,7 @@ MULTIPROCESS_IPC_TEST_MAIN(RunTestClient) { // This channel listener just replies to all messages with the exact same // message. It assumes each message has one string parameter. When the string // "quit" is sent, it will exit. -class ChannelReflectorListener : public IPC::Channel::Listener { +class ChannelReflectorListener : public IPC::Listener { public: explicit ChannelReflectorListener(IPC::Channel *channel) : channel_(channel), @@ -481,7 +481,7 @@ class ChannelReflectorListener : public IPC::Channel::Listener { int latency_messages_; }; -class ChannelPerfListener : public IPC::Channel::Listener { +class ChannelPerfListener : public IPC::Listener { public: ChannelPerfListener(IPC::Channel* channel, int msg_count, int msg_size) : count_down_(msg_count), diff --git a/ipc/sync_socket_unittest.cc b/ipc/sync_socket_unittest.cc index c8c8187..40367cf 100644 --- a/ipc/sync_socket_unittest.cc +++ b/ipc/sync_socket_unittest.cc @@ -53,7 +53,7 @@ const size_t kHelloStringLength = arraysize(kHelloString); // The SyncSocket server listener class processes two sorts of // messages from the client. -class SyncSocketServerListener : public IPC::Channel::Listener { +class SyncSocketServerListener : public IPC::Listener { public: SyncSocketServerListener() : chan_(NULL) { } @@ -121,7 +121,7 @@ MULTIPROCESS_IPC_TEST_MAIN(RunSyncSocketServer) { // The SyncSocket client listener only processes one sort of message, // a response from the server. -class SyncSocketClientListener : public IPC::Channel::Listener { +class SyncSocketClientListener : public IPC::Listener { public: SyncSocketClientListener() { } |