OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mojo/edk/system/master_connection_manager.h" | 5 #include "mojo/edk/system/master_connection_manager.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <unordered_map> | 8 #include <unordered_map> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "mojo/edk/embedder/master_process_delegate.h" | 16 #include "mojo/edk/embedder/master_process_delegate.h" |
17 #include "mojo/edk/embedder/platform_channel_pair.h" | 17 #include "mojo/edk/embedder/platform_channel_pair.h" |
18 #include "mojo/edk/embedder/platform_handle.h" | 18 #include "mojo/edk/embedder/platform_handle.h" |
19 #include "mojo/edk/embedder/platform_handle_vector.h" | 19 #include "mojo/edk/embedder/platform_handle_vector.h" |
20 #include "mojo/edk/system/connection_manager_messages.h" | 20 #include "mojo/edk/system/connection_manager_messages.h" |
21 #include "mojo/edk/system/message_in_transit.h" | 21 #include "mojo/edk/system/message_in_transit.h" |
22 #include "mojo/edk/system/raw_channel.h" | 22 #include "mojo/edk/system/raw_channel.h" |
23 #include "mojo/edk/system/transport_data.h" | 23 #include "mojo/edk/system/transport_data.h" |
24 #include "mojo/edk/system/waitable_event.h" | 24 #include "mojo/edk/system/waitable_event.h" |
25 #include "mojo/edk/util/make_unique.h" | 25 #include "mojo/edk/util/make_unique.h" |
26 #include "mojo/public/cpp/system/macros.h" | 26 #include "mojo/public/cpp/system/macros.h" |
27 | 27 |
| 28 using mojo::util::MutexLocker; |
| 29 |
28 namespace mojo { | 30 namespace mojo { |
29 namespace system { | 31 namespace system { |
30 | 32 |
31 namespace { | 33 namespace { |
32 | 34 |
33 const ProcessIdentifier kFirstSlaveProcessIdentifier = 2; | 35 const ProcessIdentifier kFirstSlaveProcessIdentifier = 2; |
34 | 36 |
35 static_assert(kMasterProcessIdentifier != kInvalidProcessIdentifier, | 37 static_assert(kMasterProcessIdentifier != kInvalidProcessIdentifier, |
36 "Bad master process identifier"); | 38 "Bad master process identifier"); |
37 static_assert(kFirstSlaveProcessIdentifier != kInvalidProcessIdentifier, | 39 static_assert(kFirstSlaveProcessIdentifier != kInvalidProcessIdentifier, |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 } | 740 } |
739 | 741 |
740 void MasterConnectionManager::AssertOnPrivateThread() const { | 742 void MasterConnectionManager::AssertOnPrivateThread() const { |
741 // This should only be called after |Init()| and before |Shutdown()|. | 743 // This should only be called after |Init()| and before |Shutdown()|. |
742 DCHECK(private_thread_.message_loop()); | 744 DCHECK(private_thread_.message_loop()); |
743 DCHECK_EQ(base::MessageLoop::current(), private_thread_.message_loop()); | 745 DCHECK_EQ(base::MessageLoop::current(), private_thread_.message_loop()); |
744 } | 746 } |
745 | 747 |
746 } // namespace system | 748 } // namespace system |
747 } // namespace mojo | 749 } // namespace mojo |
OLD | NEW |