| Index: ipc/ipc_test_sink.h
|
| diff --git a/ipc/ipc_test_sink.h b/ipc/ipc_test_sink.h
|
| index ab8531d5ea89924bd3ecd4e0a2903035f6dab4c5..3e70704348e25fd9df1b28cd329a144d3fd23a94 100644
|
| --- a/ipc/ipc_test_sink.h
|
| +++ b/ipc/ipc_test_sink.h
|
| @@ -59,17 +59,22 @@ class Message;
|
| //
|
| // class MyListener : public IPC::Listener {
|
| // public:
|
| +// MyListener(const base::Closure& closure)
|
| +// : message_received_closure_(closure) {}
|
| // virtual bool OnMessageReceived(const IPC::Message& msg) {
|
| // <do something with the message>
|
| -// MessageLoop::current()->QuitWhenIdle();
|
| +// message_received_closure_.Run();
|
| // return false; // to store the message in the sink, or true to drop it
|
| // }
|
| +// private:
|
| +// base::Closure message_received_closure_;
|
| // };
|
| //
|
| -// MyListener listener;
|
| +// base::RunLoop run_loop;
|
| +// MyListener listener(run_loop.QuitClosure());
|
| // test_sink.AddFilter(&listener);
|
| // StartSomeAsynchronousProcess(&test_sink);
|
| -// MessageLoop::current()->Run();
|
| +// run_loop.Run();
|
| // <inspect the results>
|
| // ...
|
| //
|
|
|