OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/crash/content/app/breakpad_linux.h" | 8 #include "components/crash/content/app/breakpad_linux.h" |
9 | 9 |
10 #include <fcntl.h> | 10 #include <fcntl.h> |
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 // On Android we need to provide a FD to the file where the minidump is | 1920 // On Android we need to provide a FD to the file where the minidump is |
1921 // generated as the renderer and browser run with different UIDs | 1921 // generated as the renderer and browser run with different UIDs |
1922 // (preventing the browser from inspecting the renderer process). | 1922 // (preventing the browser from inspecting the renderer process). |
1923 int minidump_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( | 1923 int minidump_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
1924 GetCrashReporterClient()->GetAndroidMinidumpDescriptor()); | 1924 GetCrashReporterClient()->GetAndroidMinidumpDescriptor()); |
1925 if (minidump_fd < 0) { | 1925 if (minidump_fd < 0) { |
1926 NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; | 1926 NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; |
1927 } else { | 1927 } else { |
1928 InitCrashKeys(); | 1928 InitCrashKeys(); |
1929 EnableNonBrowserCrashDumping(process_type, minidump_fd); | 1929 EnableNonBrowserCrashDumping(process_type, minidump_fd); |
| 1930 PostEnableBreakpadInitialization(); |
1930 } | 1931 } |
1931 } | 1932 } |
1932 } | 1933 } |
1933 | 1934 |
1934 // The microdump handler does NOT upload anything. It just dumps out on the | 1935 // The microdump handler does NOT upload anything. It just dumps out on the |
1935 // system console (logcat) a restricted and serialized variant of a minidump. | 1936 // system console (logcat) a restricted and serialized variant of a minidump. |
1936 // See crbug.com/410294 for more details. | 1937 // See crbug.com/410294 for more details. |
1937 void InitMicrodumpCrashHandlerIfNecessary(const std::string& process_type) { | 1938 void InitMicrodumpCrashHandlerIfNecessary(const std::string& process_type) { |
1938 if (!GetCrashReporterClient()->ShouldEnableBreakpadMicrodumps()) | 1939 if (!GetCrashReporterClient()->ShouldEnableBreakpadMicrodumps()) |
1939 return; | 1940 return; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 void SuppressDumpGeneration() { | 1975 void SuppressDumpGeneration() { |
1975 g_dumps_suppressed = G_DUMPS_SUPPRESSED_MAGIC; | 1976 g_dumps_suppressed = G_DUMPS_SUPPRESSED_MAGIC; |
1976 } | 1977 } |
1977 #endif // OS_ANDROID | 1978 #endif // OS_ANDROID |
1978 | 1979 |
1979 bool IsCrashReporterEnabled() { | 1980 bool IsCrashReporterEnabled() { |
1980 return g_is_crash_reporter_enabled; | 1981 return g_is_crash_reporter_enabled; |
1981 } | 1982 } |
1982 | 1983 |
1983 } // namespace breakpad | 1984 } // namespace breakpad |
OLD | NEW |