| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/service_manager/runner/host/mach_broker.h" | 5 #include "services/service_manager/runner/host/mach_broker.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 | 9 |
| 10 namespace shell { | 10 namespace service_manager { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 const char kBootstrapPortName[] = "mojo_shell"; | 13 const char kBootstrapPortName[] = "mojo_shell"; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 void MachBroker::SendTaskPortToParent() { | 17 void MachBroker::SendTaskPortToParent() { |
| 18 bool result = base::MachPortBroker::ChildSendTaskPortToParent( | 18 bool result = base::MachPortBroker::ChildSendTaskPortToParent( |
| 19 kBootstrapPortName); | 19 kBootstrapPortName); |
| 20 DCHECK(result); | 20 DCHECK(result); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 MachBroker::~MachBroker() {} | 33 MachBroker::~MachBroker() {} |
| 34 | 34 |
| 35 void MachBroker::ExpectPid(base::ProcessHandle pid) { | 35 void MachBroker::ExpectPid(base::ProcessHandle pid) { |
| 36 broker_.AddPlaceholderForPid(pid); | 36 broker_.AddPlaceholderForPid(pid); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void MachBroker::RemovePid(base::ProcessHandle pid) { | 39 void MachBroker::RemovePid(base::ProcessHandle pid) { |
| 40 broker_.InvalidatePid(pid); | 40 broker_.InvalidatePid(pid); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace shell | 43 } // namespace service_manager |
| OLD | NEW |