OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/zygote_host_linux.h" | 5 #include "chrome/browser/zygote_host_linux.h" |
6 | 6 |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/eintr_wrapper.h" | 13 #include "base/eintr_wrapper.h" |
14 #include "base/env_var.h" | 14 #include "base/env_var.h" |
15 #include "base/linux_util.h" | 15 #include "base/linux_util.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
18 #include "base/pickle.h" | 18 #include "base/pickle.h" |
19 #include "base/process_util.h" | 19 #include "base/process_util.h" |
20 #include "base/string_number_conversions.h" | 20 #include "base/string_number_conversions.h" |
21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
22 #include "base/scoped_ptr.h" | 22 #include "base/scoped_ptr.h" |
23 #include "base/unix_domain_socket_posix.h" | 23 #include "base/unix_domain_socket_posix.h" |
| 24 #include "base/utf_string_conversions.h" |
24 | 25 |
25 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" | 26 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" |
26 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" |
27 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
28 #include "chrome/common/process_watcher.h" | 29 #include "chrome/common/process_watcher.h" |
29 | 30 |
30 #include "sandbox/linux/suid/suid_unsafe_environment_variables.h" | 31 #include "sandbox/linux/suid/suid_unsafe_environment_variables.h" |
31 | 32 |
32 static void SaveSUIDUnsafeEnvironmentVariables() { | 33 static void SaveSUIDUnsafeEnvironmentVariables() { |
33 // The ELF loader will clear many environment variables so we save them to | 34 // The ELF loader will clear many environment variables so we save them to |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 !read_pickle.ReadBool(&iter, &tmp_child_exited)) { | 336 !read_pickle.ReadBool(&iter, &tmp_child_exited)) { |
336 LOG(WARNING) << "Error parsing DidProcessCrash response from zygote."; | 337 LOG(WARNING) << "Error parsing DidProcessCrash response from zygote."; |
337 return false; | 338 return false; |
338 } | 339 } |
339 | 340 |
340 if (child_exited) | 341 if (child_exited) |
341 *child_exited = tmp_child_exited; | 342 *child_exited = tmp_child_exited; |
342 | 343 |
343 return did_crash; | 344 return did_crash; |
344 } | 345 } |
OLD | NEW |