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

Side by Side Diff: chrome/app/breakpad_linux.cc

Issue 19697015: Move dependency on env_vars.h to breakpad client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/app/breakpad_mac.mm » ('j') | 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 // 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 7
8 #include "chrome/app/breakpad_linux.h" 8 #include "chrome/app/breakpad_linux.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 22 matching lines...) Expand all
33 #include "base/posix/global_descriptors.h" 33 #include "base/posix/global_descriptors.h"
34 #include "base/process_util.h" 34 #include "base/process_util.h"
35 #include "base/strings/string_util.h" 35 #include "base/strings/string_util.h"
36 #include "breakpad/src/client/linux/handler/exception_handler.h" 36 #include "breakpad/src/client/linux/handler/exception_handler.h"
37 #include "breakpad/src/client/linux/minidump_writer/directory_reader.h" 37 #include "breakpad/src/client/linux/minidump_writer/directory_reader.h"
38 #include "breakpad/src/common/linux/linux_libc_support.h" 38 #include "breakpad/src/common/linux/linux_libc_support.h"
39 #include "breakpad/src/common/memory.h" 39 #include "breakpad/src/common/memory.h"
40 #include "chrome/app/breakpad_linux_impl.h" 40 #include "chrome/app/breakpad_linux_impl.h"
41 #include "chrome/browser/crash_upload_list.h" 41 #include "chrome/browser/crash_upload_list.h"
42 #include "chrome/common/child_process_logging.h" 42 #include "chrome/common/child_process_logging.h"
43 #include "chrome/common/env_vars.h"
44 #include "components/breakpad/breakpad_client.h" 43 #include "components/breakpad/breakpad_client.h"
45 #include "content/public/common/content_descriptors.h" 44 #include "content/public/common/content_descriptors.h"
46 #include "content/public/common/content_switches.h" 45 #include "content/public/common/content_switches.h"
47 46
48 #if defined(OS_ANDROID) 47 #if defined(OS_ANDROID)
49 #include <android/log.h> 48 #include <android/log.h>
50 #include <sys/stat.h> 49 #include <sys/stat.h>
51 50
52 #include "base/android/build_info.h" 51 #include "base/android/build_info.h"
53 #include "base/android/path_utils.h" 52 #include "base/android/path_utils.h"
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 base::android::BuildInfo::GetInstance(); 1648 base::android::BuildInfo::GetInstance();
1650 #endif 1649 #endif
1651 // Determine the process type and take appropriate action. 1650 // Determine the process type and take appropriate action.
1652 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 1651 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
1653 if (parsed_command_line.HasSwitch(switches::kDisableBreakpad)) 1652 if (parsed_command_line.HasSwitch(switches::kDisableBreakpad))
1654 return; 1653 return;
1655 1654
1656 const std::string process_type = 1655 const std::string process_type =
1657 parsed_command_line.GetSwitchValueASCII(switches::kProcessType); 1656 parsed_command_line.GetSwitchValueASCII(switches::kProcessType);
1658 if (process_type.empty()) { 1657 if (process_type.empty()) {
1659 EnableCrashDumping(getenv(env_vars::kHeadless) != NULL); 1658 EnableCrashDumping(breakpad::GetBreakpadClient()->IsRunningUnattended());
1660 } else if (process_type == switches::kRendererProcess || 1659 } else if (process_type == switches::kRendererProcess ||
1661 process_type == switches::kPluginProcess || 1660 process_type == switches::kPluginProcess ||
1662 process_type == switches::kPpapiPluginProcess || 1661 process_type == switches::kPpapiPluginProcess ||
1663 process_type == switches::kZygoteProcess || 1662 process_type == switches::kZygoteProcess ||
1664 process_type == switches::kGpuProcess) { 1663 process_type == switches::kGpuProcess) {
1665 #if defined(OS_ANDROID) 1664 #if defined(OS_ANDROID)
1666 NOTREACHED() << "Breakpad initialized with InitCrashReporter() instead of " 1665 NOTREACHED() << "Breakpad initialized with InitCrashReporter() instead of "
1667 "InitNonBrowserCrashReporter in " << process_type << " process."; 1666 "InitNonBrowserCrashReporter in " << process_type << " process.";
1668 return; 1667 return;
1669 #else 1668 #else
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 } else { 1707 } else {
1709 EnableNonBrowserCrashDumping(minidump_fd); 1708 EnableNonBrowserCrashDumping(minidump_fd);
1710 } 1709 }
1711 } 1710 }
1712 } 1711 }
1713 #endif // OS_ANDROID 1712 #endif // OS_ANDROID
1714 1713
1715 bool IsCrashReporterEnabled() { 1714 bool IsCrashReporterEnabled() {
1716 return g_is_crash_reporter_enabled; 1715 return g_is_crash_reporter_enabled;
1717 } 1716 }
OLDNEW
« no previous file with comments | « no previous file | chrome/app/breakpad_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698