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

Side by Side Diff: ipc/ipc_channel_mojo_unittest.cc

Issue 2754143005: Use WaitableEvents to wake up sync IPC waiting (Closed)
Patch Set: . Created 3 years, 8 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/BUILD.gn ('k') | ipc/ipc_mojo_bootstrap.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 "ipc/ipc_channel_mojo.h" 5 #include "ipc/ipc_channel_mojo.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 proxy_->Init(std::move(factory), true); 663 proxy_->Init(std::move(factory), true);
664 } 664 }
665 665
666 IPC::ChannelProxy* proxy() { return proxy_.get(); } 666 IPC::ChannelProxy* proxy() { return proxy_.get(); }
667 667
668 private: 668 private:
669 const bool for_server_; 669 const bool for_server_;
670 670
671 mojo::ScopedMessagePipeHandle handle_; 671 mojo::ScopedMessagePipeHandle handle_;
672 base::Thread io_thread_; 672 base::Thread io_thread_;
673 base::WaitableEvent never_signaled_;
673 std::unique_ptr<IPC::ChannelProxy> proxy_; 674 std::unique_ptr<IPC::ChannelProxy> proxy_;
674 base::WaitableEvent never_signaled_;
675 675
676 DISALLOW_COPY_AND_ASSIGN(ChannelProxyRunner); 676 DISALLOW_COPY_AND_ASSIGN(ChannelProxyRunner);
677 }; 677 };
678 678
679 class IPCChannelProxyMojoTest : public IPCChannelMojoTestBase { 679 class IPCChannelProxyMojoTest : public IPCChannelMojoTestBase {
680 public: 680 public:
681 void Init(const std::string& client_name) { 681 void Init(const std::string& client_name) {
682 IPCChannelMojoTestBase::Init(client_name); 682 IPCChannelMojoTestBase::Init(client_name);
683 runner_.reset(new ChannelProxyRunner(TakeHandle(), true)); 683 runner_.reset(new ChannelProxyRunner(TakeHandle(), true));
684 } 684 }
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 Connect(&listener); 1463 Connect(&listener);
1464 1464
1465 base::RunLoop().Run(); 1465 base::RunLoop().Run();
1466 1466
1467 Close(); 1467 Close();
1468 } 1468 }
1469 1469
1470 #endif // OS_LINUX 1470 #endif // OS_LINUX
1471 1471
1472 } // namespace 1472 } // namespace
OLDNEW
« no previous file with comments | « ipc/BUILD.gn ('k') | ipc/ipc_mojo_bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698