OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // For linux_syscall_support.h. This makes it safe to call embedded system | 5 // For linux_syscall_support.h. This makes it safe to call embedded system |
6 // calls when in seccomp mode. | 6 // calls when in seccomp mode. |
7 #define SYS_SYSCALL_ENTRYPOINT "playground$syscallEntryPoint" | 7 #define SYS_SYSCALL_ENTRYPOINT "playground$syscallEntryPoint" |
8 | 8 |
9 #include "chrome/app/breakpad_linux.h" | 9 #include "chrome/app/breakpad_linux.h" |
10 | 10 |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 // Determine the process type and take appropriate action. | 885 // Determine the process type and take appropriate action. |
886 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 886 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
887 if (parsed_command_line.HasSwitch(switches::kDisableBreakpad)) | 887 if (parsed_command_line.HasSwitch(switches::kDisableBreakpad)) |
888 return; | 888 return; |
889 | 889 |
890 const std::string process_type = | 890 const std::string process_type = |
891 parsed_command_line.GetSwitchValueASCII(switches::kProcessType); | 891 parsed_command_line.GetSwitchValueASCII(switches::kProcessType); |
892 if (process_type.empty()) { | 892 if (process_type.empty()) { |
893 EnableCrashDumping(getenv(env_vars::kHeadless) != NULL); | 893 EnableCrashDumping(getenv(env_vars::kHeadless) != NULL); |
894 } else if (process_type == switches::kRendererProcess || | 894 } else if (process_type == switches::kRendererProcess || |
895 process_type == switches::kExtensionProcess || | |
896 process_type == switches::kPluginProcess || | 895 process_type == switches::kPluginProcess || |
897 process_type == switches::kPpapiPluginProcess || | 896 process_type == switches::kPpapiPluginProcess || |
898 process_type == switches::kZygoteProcess || | 897 process_type == switches::kZygoteProcess || |
899 process_type == switches::kGpuProcess) { | 898 process_type == switches::kGpuProcess) { |
900 // We might be chrooted in a zygote or renderer process so we cannot call | 899 // We might be chrooted in a zygote or renderer process so we cannot call |
901 // GetCollectStatsConsent because that needs access the the user's home | 900 // GetCollectStatsConsent because that needs access the the user's home |
902 // dir. Instead, we set a command line flag for these processes. | 901 // dir. Instead, we set a command line flag for these processes. |
903 // Even though plugins are not chrooted, we share the same code path for | 902 // Even though plugins are not chrooted, we share the same code path for |
904 // simplicity. | 903 // simplicity. |
905 if (!parsed_command_line.HasSwitch(switches::kEnableCrashReporter)) | 904 if (!parsed_command_line.HasSwitch(switches::kEnableCrashReporter)) |
(...skipping 15 matching lines...) Expand all Loading... |
921 struct timeval tv; | 920 struct timeval tv; |
922 if (!gettimeofday(&tv, NULL)) | 921 if (!gettimeofday(&tv, NULL)) |
923 process_start_time = timeval_to_ms(&tv); | 922 process_start_time = timeval_to_ms(&tv); |
924 else | 923 else |
925 process_start_time = 0; | 924 process_start_time = 0; |
926 } | 925 } |
927 | 926 |
928 bool IsCrashReporterEnabled() { | 927 bool IsCrashReporterEnabled() { |
929 return is_crash_reporter_enabled; | 928 return is_crash_reporter_enabled; |
930 } | 929 } |
OLD | NEW |