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

Side by Side Diff: util/test/multiprocess_exec_win.cc

Issue 854363006: win: Implementation of http_transport_win based on WinInet (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@multiproc-impl
Patch Set: Created 5 years, 11 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 | « util/net/http_transport_win.cc ('k') | util/util.gyp » ('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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 MultiprocessExec::~MultiprocessExec() { 131 MultiprocessExec::~MultiprocessExec() {
132 delete info_; 132 delete info_;
133 } 133 }
134 134
135 void MultiprocessExec::PreFork() { 135 void MultiprocessExec::PreFork() {
136 ASSERT_FALSE(command_.empty()); 136 ASSERT_FALSE(command_.empty());
137 137
138 argv_.clear(); 138 argv_.clear();
139 ArgvQuote(base::UTF8ToUTF16(command_), &argv_);
139 for (size_t i = 0; i < arguments_.size(); ++i) { 140 for (size_t i = 0; i < arguments_.size(); ++i) {
141 argv_ += L" ";
140 ArgvQuote(base::UTF8ToUTF16(arguments_[i]), &argv_); 142 ArgvQuote(base::UTF8ToUTF16(arguments_[i]), &argv_);
141 if (i < arguments_.size() - 1)
142 argv_ += L" ";
143 } 143 }
144 144
145 // Make pipes for child-to-parent and parent-to-child communication. Mark them 145 // Make pipes for child-to-parent and parent-to-child communication. Mark them
146 // as inheritable via the SECURITY_ATTRIBUTES, but use SetHandleInformation to 146 // as inheritable via the SECURITY_ATTRIBUTES, but use SetHandleInformation to
147 // ensure that the parent sides are not inherited. 147 // ensure that the parent sides are not inherited.
148 ASSERT_EQ(nullptr, info_); 148 ASSERT_EQ(nullptr, info_);
149 info_ = new internal::MultiprocessInfo; 149 info_ = new internal::MultiprocessInfo;
150 150
151 SECURITY_ATTRIBUTES security_attributes = {0}; 151 SECURITY_ATTRIBUTES security_attributes = {0};
152 security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES); 152 security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES);
(...skipping 26 matching lines...) Expand all
179 TRUE, 179 TRUE,
180 0, 180 0,
181 nullptr, 181 nullptr,
182 nullptr, 182 nullptr,
183 &startup_info, 183 &startup_info,
184 &info_->process_info)); 184 &info_->process_info));
185 } 185 }
186 186
187 } // namespace test 187 } // namespace test
188 } // namespace crashpad 188 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/net/http_transport_win.cc ('k') | util/util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698