OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } // namespace | 135 } // namespace |
136 | 136 |
137 WinChildProcess::WinChildProcess() { | 137 WinChildProcess::WinChildProcess() { |
138 std::string switch_value; | 138 std::string switch_value; |
139 CHECK(GetSwitch(kIsMultiprocessChild, &switch_value)); | 139 CHECK(GetSwitch(kIsMultiprocessChild, &switch_value)); |
140 | 140 |
141 // Set up the handles we inherited from the parent. These are inherited from | 141 // Set up the handles we inherited from the parent. These are inherited from |
142 // the parent and so are open and have the same value as in the parent. The | 142 // the parent and so are open and have the same value as in the parent. The |
143 // values are passed to the child on the command line. | 143 // values are passed to the child on the command line. |
144 std::string left, right; | 144 std::string left, right; |
145 CHECK(SplitString(switch_value, '|', &left, &right)); | 145 CHECK(SplitStringFirst(switch_value, '|', &left, &right)); |
146 | 146 |
147 // left and right were formatted as 0x%x, so they need to be converted as | 147 // left and right were formatted as 0x%x, so they need to be converted as |
148 // unsigned ints. | 148 // unsigned ints. |
149 unsigned int write, read; | 149 unsigned int write, read; |
150 CHECK(StringToNumber(left, &write)); | 150 CHECK(StringToNumber(left, &write)); |
151 CHECK(StringToNumber(right, &read)); | 151 CHECK(StringToNumber(right, &read)); |
152 | 152 |
153 pipe_write_.reset(IntToHandle(write)); | 153 pipe_write_.reset(IntToHandle(write)); |
154 pipe_read_.reset(IntToHandle(read)); | 154 pipe_read_.reset(IntToHandle(read)); |
155 | 155 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 void WinChildProcess::CloseReadPipe() { | 227 void WinChildProcess::CloseReadPipe() { |
228 pipe_read_.reset(); | 228 pipe_read_.reset(); |
229 } | 229 } |
230 | 230 |
231 void WinChildProcess::CloseWritePipe() { | 231 void WinChildProcess::CloseWritePipe() { |
232 pipe_write_.reset(); | 232 pipe_write_.reset(); |
233 } | 233 } |
234 | 234 |
235 } // namespace test | 235 } // namespace test |
236 } // namespace crashpad | 236 } // namespace crashpad |
OLD | NEW |