Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: test/win/win_child_process.cc

Issue 1357833002: win: Get Crashpad compiling under VS2015 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: include Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « snapshot/win/system_snapshot_win_test.cc ('k') | util/win/exception_handler_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 CHECK(GetSwitch(kIsMultiprocessChild, &switch_value)); 145 CHECK(GetSwitch(kIsMultiprocessChild, &switch_value));
146 146
147 // Set up the handles we inherited from the parent. These are inherited from 147 // Set up the handles we inherited from the parent. These are inherited from
148 // the parent and so are open and have the same value as in the parent. The 148 // the parent and so are open and have the same value as in the parent. The
149 // values are passed to the child on the command line. 149 // values are passed to the child on the command line.
150 std::string left, right; 150 std::string left, right;
151 CHECK(SplitString(switch_value, '|', &left, &right)); 151 CHECK(SplitString(switch_value, '|', &left, &right));
152 unsigned int write, read; 152 unsigned int write, read;
153 CHECK(StringToNumber(left, &write)); 153 CHECK(StringToNumber(left, &write));
154 CHECK(StringToNumber(right, &read)); 154 CHECK(StringToNumber(right, &read));
155 pipe_write_.reset(reinterpret_cast<HANDLE>(write)); 155 pipe_write_.reset(reinterpret_cast<HANDLE>(static_cast<uintptr_t>(write)));
156 pipe_read_.reset(reinterpret_cast<HANDLE>(read)); 156 pipe_read_.reset(reinterpret_cast<HANDLE>(static_cast<uintptr_t>(read)));
157 157
158 // Notify the parent that it's OK to proceed. We only need to wait to get to 158 // Notify the parent that it's OK to proceed. We only need to wait to get to
159 // the process entry point, but this is the easiest place we can notify. 159 // the process entry point, but this is the easiest place we can notify.
160 char c = ' '; 160 char c = ' ';
161 CheckedWriteFile(WritePipeHandle(), &c, sizeof(c)); 161 CheckedWriteFile(WritePipeHandle(), &c, sizeof(c));
162 } 162 }
163 163
164 // static 164 // static
165 bool WinChildProcess::IsChildProcess() { 165 bool WinChildProcess::IsChildProcess() {
166 return GetSwitch(kIsMultiprocessChild, nullptr); 166 return GetSwitch(kIsMultiprocessChild, nullptr);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void WinChildProcess::CloseReadPipe() { 229 void WinChildProcess::CloseReadPipe() {
230 pipe_read_.reset(); 230 pipe_read_.reset();
231 } 231 }
232 232
233 void WinChildProcess::CloseWritePipe() { 233 void WinChildProcess::CloseWritePipe() {
234 pipe_write_.reset(); 234 pipe_write_.reset();
235 } 235 }
236 236
237 } // namespace test 237 } // namespace test
238 } // namespace crashpad 238 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/win/system_snapshot_win_test.cc ('k') | util/win/exception_handler_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698