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

Side by Side Diff: content/zygote/zygote_linux.cc

Issue 892213004: Mechanical rename of base::debug -> base::trace_event for /content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part3_1
Patch Set: Rebase. Created 5 years, 10 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 | « content/renderer/scheduler/task_queue_selector.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/zygote/zygote_linux.h" 5 #include "content/zygote/zygote_linux.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <string.h> 8 #include <string.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 if (real_pid <= 0) { 396 if (real_pid <= 0) {
397 LOG(FATAL) << "Invalid pid from parent zygote"; 397 LOG(FATAL) << "Invalid pid from parent zygote";
398 } 398 }
399 #if defined(OS_LINUX) 399 #if defined(OS_LINUX)
400 // Sandboxed processes need to send the global, non-namespaced PID when 400 // Sandboxed processes need to send the global, non-namespaced PID when
401 // setting up an IPC channel to their parent. 401 // setting up an IPC channel to their parent.
402 IPC::Channel::SetGlobalPid(real_pid); 402 IPC::Channel::SetGlobalPid(real_pid);
403 // Force the real PID so chrome event data have a PID that corresponds 403 // Force the real PID so chrome event data have a PID that corresponds
404 // to system trace event data. 404 // to system trace event data.
405 base::debug::TraceLog::GetInstance()->SetProcessID( 405 base::trace_event::TraceLog::GetInstance()->SetProcessID(
406 static_cast<int>(real_pid)); 406 static_cast<int>(real_pid));
407 #endif 407 #endif
408 return 0; 408 return 0;
409 } 409 }
410 410
411 // In the parent process. 411 // In the parent process.
412 read_pipe.reset(); 412 read_pipe.reset();
413 pid_oracle.reset(); 413 pid_oracle.reset();
414 414
415 // Always receive a real PID from the zygote host, though it might 415 // Always receive a real PID from the zygote host, though it might
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 PickleIterator iter) { 584 PickleIterator iter) {
585 if (HANDLE_EINTR(write(fd, &sandbox_flags_, sizeof(sandbox_flags_))) != 585 if (HANDLE_EINTR(write(fd, &sandbox_flags_, sizeof(sandbox_flags_))) !=
586 sizeof(sandbox_flags_)) { 586 sizeof(sandbox_flags_)) {
587 PLOG(ERROR) << "write"; 587 PLOG(ERROR) << "write";
588 } 588 }
589 589
590 return false; 590 return false;
591 } 591 }
592 592
593 } // namespace content 593 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/scheduler/task_queue_selector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698