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

Side by Side Diff: ipc/ipc_channel_proxy_unittest.cc

Issue 1127153003: ipc: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_posix_unittest.cc ('k') | ipc/ipc_channel_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "base/message_loop/message_loop.h"
8 #include "base/pickle.h" 7 #include "base/pickle.h"
9 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
10 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
11 #include "ipc/ipc_test_base.h" 10 #include "ipc/ipc_test_base.h"
12 #include "ipc/message_filter.h" 11 #include "ipc/message_filter.h"
13 12
14 // Get basic type definitions. 13 // Get basic type definitions.
15 #define IPC_MESSAGE_IMPL 14 #define IPC_MESSAGE_IMPL
16 #include "ipc/ipc_channel_proxy_unittest_messages.h" 15 #include "ipc/ipc_channel_proxy_unittest_messages.h"
17 16
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 IPCTestBase::SetUp(); 235 IPCTestBase::SetUp();
237 236
238 Init("ChannelProxyClient"); 237 Init("ChannelProxyClient");
239 238
240 thread_.reset(new base::Thread("ChannelProxyTestServerThread")); 239 thread_.reset(new base::Thread("ChannelProxyTestServerThread"));
241 base::Thread::Options options; 240 base::Thread::Options options;
242 options.message_loop_type = base::MessageLoop::TYPE_IO; 241 options.message_loop_type = base::MessageLoop::TYPE_IO;
243 thread_->StartWithOptions(options); 242 thread_->StartWithOptions(options);
244 243
245 listener_.reset(new QuitListener()); 244 listener_.reset(new QuitListener());
246 CreateChannelProxy(listener_.get(), thread_->message_loop_proxy().get()); 245 CreateChannelProxy(listener_.get(), thread_->task_runner().get());
247 246
248 ASSERT_TRUE(StartClient()); 247 ASSERT_TRUE(StartClient());
249 } 248 }
250 249
251 void TearDown() override { 250 void TearDown() override {
252 DestroyChannelProxy(); 251 DestroyChannelProxy();
253 thread_.reset(); 252 thread_.reset();
254 listener_.reset(); 253 listener_.reset();
255 IPCTestBase::TearDown(); 254 IPCTestBase::TearDown();
256 } 255 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 IPCTestBase::GetChannelName("ChannelProxyClient"), 426 IPCTestBase::GetChannelName("ChannelProxyClient"),
428 &listener)); 427 &listener));
429 CHECK(channel->Connect()); 428 CHECK(channel->Connect());
430 listener.Init(channel.get()); 429 listener.Init(channel.get());
431 430
432 base::MessageLoop::current()->Run(); 431 base::MessageLoop::current()->Run();
433 return 0; 432 return 0;
434 } 433 }
435 434
436 } // namespace 435 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix_unittest.cc ('k') | ipc/ipc_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698