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

Side by Side Diff: components/nacl/zygote/nacl_fork_delegate_linux.cc

Issue 1508213002: Replace ScopedVector<ScopedFD> with std::vector<ScopedFD> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert gratuitous .at(0) change back to [0] Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/nacl/zygote/nacl_fork_delegate_linux.h" 5 #include "components/nacl/zygote/nacl_fork_delegate_linux.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 reply_data_buffer_size); 106 reply_data_buffer_size);
107 DCHECK(reply_size); 107 DCHECK(reply_size);
108 108
109 if (!base::UnixDomainSocket::SendMsg(ipc_channel, request_pickle.data(), 109 if (!base::UnixDomainSocket::SendMsg(ipc_channel, request_pickle.data(),
110 request_pickle.size(), attached_fds)) { 110 request_pickle.size(), attached_fds)) {
111 LOG(ERROR) << "SendIPCRequestAndReadReply: SendMsg failed"; 111 LOG(ERROR) << "SendIPCRequestAndReadReply: SendMsg failed";
112 return false; 112 return false;
113 } 113 }
114 114
115 // Then read the remote reply. 115 // Then read the remote reply.
116 ScopedVector<base::ScopedFD> received_fds; 116 std::vector<base::ScopedFD> received_fds;
117 const ssize_t msg_len = 117 const ssize_t msg_len =
118 base::UnixDomainSocket::RecvMsg(ipc_channel, reply_data_buffer, 118 base::UnixDomainSocket::RecvMsg(ipc_channel, reply_data_buffer,
119 reply_data_buffer_size, &received_fds); 119 reply_data_buffer_size, &received_fds);
120 if (msg_len <= 0) { 120 if (msg_len <= 0) {
121 LOG(ERROR) << "SendIPCRequestAndReadReply: RecvMsg failed"; 121 LOG(ERROR) << "SendIPCRequestAndReadReply: RecvMsg failed";
122 return false; 122 return false;
123 } 123 }
124 *reply_size = msg_len; 124 *reply_size = msg_len;
125 return true; 125 return true;
126 } 126 }
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 pass_through_vars.push_back(kNaClVerbosity); 456 pass_through_vars.push_back(kNaClVerbosity);
457 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest); 457 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest);
458 for (size_t i = 0; i < pass_through_vars.size(); ++i) { 458 for (size_t i = 0; i < pass_through_vars.size(); ++i) {
459 std::string temp; 459 std::string temp;
460 if (env->GetVar(pass_through_vars[i].c_str(), &temp)) 460 if (env->GetVar(pass_through_vars[i].c_str(), &temp))
461 options->environ[pass_through_vars[i]] = temp; 461 options->environ[pass_through_vars[i]] = temp;
462 } 462 }
463 } 463 }
464 464
465 } // namespace nacl 465 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698