OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 MachMultiprocess::~MachMultiprocess() { | 86 MachMultiprocess::~MachMultiprocess() { |
87 } | 87 } |
88 | 88 |
89 void MachMultiprocess::PreFork() { | 89 void MachMultiprocess::PreFork() { |
90 ASSERT_NO_FATAL_FAILURE(Multiprocess::PreFork()); | 90 ASSERT_NO_FATAL_FAILURE(Multiprocess::PreFork()); |
91 | 91 |
92 // Set up the parent port and register it with the bootstrap server before | 92 // Set up the parent port and register it with the bootstrap server before |
93 // forking, so that it’s guaranteed to be there when the child attempts to | 93 // forking, so that it’s guaranteed to be there when the child attempts to |
94 // look it up. | 94 // look it up. |
95 info_->service_name = "com.googlecode.crashpad.test.mach_multiprocess."; | 95 info_->service_name = "org.chromium.crashpad.test.mach_multiprocess."; |
96 for (int index = 0; index < 16; ++index) { | 96 for (int index = 0; index < 16; ++index) { |
97 info_->service_name.append(1, base::RandInt('A', 'Z')); | 97 info_->service_name.append(1, base::RandInt('A', 'Z')); |
98 } | 98 } |
99 | 99 |
100 info_->local_port = BootstrapCheckIn(info_->service_name); | 100 info_->local_port = BootstrapCheckIn(info_->service_name); |
101 ASSERT_TRUE(info_->local_port.is_valid()); | 101 ASSERT_TRUE(info_->local_port.is_valid()); |
102 } | 102 } |
103 | 103 |
104 mach_port_t MachMultiprocess::LocalPort() const { | 104 mach_port_t MachMultiprocess::LocalPort() const { |
105 EXPECT_TRUE(info_->local_port.is_valid()); | 105 EXPECT_TRUE(info_->local_port.is_valid()); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 if (testing::Test::HasFailure()) { | 262 if (testing::Test::HasFailure()) { |
263 // Trigger the ScopedForbidReturn destructor. | 263 // Trigger the ScopedForbidReturn destructor. |
264 return; | 264 return; |
265 } | 265 } |
266 | 266 |
267 forbid_return.Disarm(); | 267 forbid_return.Disarm(); |
268 } | 268 } |
269 | 269 |
270 } // namespace test | 270 } // namespace test |
271 } // namespace crashpad | 271 } // namespace crashpad |
OLD | NEW |