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

Side by Side Diff: chrome/browser/renderer_host/render_sandbox_host_linux.cc

Issue 177024: Linux: about:memory (Closed)
Patch Set: ... Created 11 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/render_sandbox_host_linux.h" 5 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 #include <sys/uio.h> 9 #include <sys/uio.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 CHECK(socketpair(AF_UNIX, SOCK_DGRAM, 0, fds) == 0); 288 CHECK(socketpair(AF_UNIX, SOCK_DGRAM, 0, fds) == 0);
289 289
290 renderer_socket_ = fds[0]; 290 renderer_socket_ = fds[0];
291 const int browser_socket = fds[1]; 291 const int browser_socket = fds[1];
292 292
293 int pipefds[2]; 293 int pipefds[2];
294 CHECK(0 == pipe(pipefds)); 294 CHECK(0 == pipe(pipefds));
295 const int child_lifeline_fd = pipefds[0]; 295 const int child_lifeline_fd = pipefds[0];
296 childs_lifeline_fd_ = pipefds[1]; 296 childs_lifeline_fd_ = pipefds[1];
297 297
298 const pid_t child = fork(); 298 pid_ = fork();
299 if (child == 0) { 299 if (pid_ == 0) {
300 SandboxIPCProcess handler(child_lifeline_fd, browser_socket); 300 SandboxIPCProcess handler(child_lifeline_fd, browser_socket);
301 handler.Run(); 301 handler.Run();
302 _exit(0); 302 _exit(0);
303 } 303 }
304 } 304 }
305 305
306 RenderSandboxHostLinux::~RenderSandboxHostLinux() { 306 RenderSandboxHostLinux::~RenderSandboxHostLinux() {
307 HANDLE_EINTR(close(renderer_socket_)); 307 HANDLE_EINTR(close(renderer_socket_));
308 HANDLE_EINTR(close(childs_lifeline_fd_)); 308 HANDLE_EINTR(close(childs_lifeline_fd_));
309 } 309 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_sandbox_host_linux.h ('k') | chrome/browser/resources/about_memory_linux.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698