| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void OnError(Error error) override; | 84 void OnError(Error error) override; |
| 85 | 85 |
| 86 // Handles an error that's fatal to this object. Note that this probably | 86 // Handles an error that's fatal to this object. Note that this probably |
| 87 // results in |Shutdown()| being called (in the nested context) and then this | 87 // results in |Shutdown()| being called (in the nested context) and then this |
| 88 // object being destroyed. | 88 // object being destroyed. |
| 89 void FatalError(); | 89 void FatalError(); |
| 90 | 90 |
| 91 MasterConnectionManager* const owner_; | 91 MasterConnectionManager* const owner_; |
| 92 const ProcessIdentifier process_identifier_; | 92 const ProcessIdentifier process_identifier_; |
| 93 embedder::SlaveInfo const slave_info_; | 93 embedder::SlaveInfo const slave_info_; |
| 94 scoped_ptr<RawChannel> raw_channel_; | 94 std::unique_ptr<RawChannel> raw_channel_; |
| 95 | 95 |
| 96 MOJO_DISALLOW_COPY_AND_ASSIGN(Helper); | 96 MOJO_DISALLOW_COPY_AND_ASSIGN(Helper); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 MasterConnectionManager::Helper::Helper( | 99 MasterConnectionManager::Helper::Helper( |
| 100 MasterConnectionManager* owner, | 100 MasterConnectionManager* owner, |
| 101 ProcessIdentifier process_identifier, | 101 ProcessIdentifier process_identifier, |
| 102 embedder::SlaveInfo slave_info, | 102 embedder::SlaveInfo slave_info, |
| 103 embedder::ScopedPlatformHandle platform_handle) | 103 embedder::ScopedPlatformHandle platform_handle) |
| 104 : owner_(owner), | 104 : owner_(owner), |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 } | 736 } |
| 737 | 737 |
| 738 void MasterConnectionManager::AssertOnPrivateThread() const { | 738 void MasterConnectionManager::AssertOnPrivateThread() const { |
| 739 // This should only be called after |Init()| and before |Shutdown()|. | 739 // This should only be called after |Init()| and before |Shutdown()|. |
| 740 DCHECK(private_thread_.message_loop()); | 740 DCHECK(private_thread_.message_loop()); |
| 741 DCHECK_EQ(base::MessageLoop::current(), private_thread_.message_loop()); | 741 DCHECK_EQ(base::MessageLoop::current(), private_thread_.message_loop()); |
| 742 } | 742 } |
| 743 | 743 |
| 744 } // namespace system | 744 } // namespace system |
| 745 } // namespace mojo | 745 } // namespace mojo |
| OLD | NEW |