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 #ifndef COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ | 5 #ifndef COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ |
6 #define COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ | 6 #define COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/android/application_status_listener.h" | 10 #include "base/android/application_status_listener.h" |
11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/process/kill.h" | 14 #include "base/process/kill.h" |
15 #include "base/process/process.h" | 15 #include "base/process/process.h" |
16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
17 #include "content/public/browser/browser_child_process_observer.h" | 17 #include "content/public/browser/browser_child_process_observer.h" |
18 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
20 #include "content/public/common/process_type.h" | 20 #include "content/public/common/process_type.h" |
21 | 21 |
22 namespace content { | |
23 class RenderProcessHost; | |
24 } | |
25 | |
26 namespace breakpad { | 22 namespace breakpad { |
27 | 23 |
28 // This class manages the crash minidumps. | 24 // This class manages the crash minidumps. |
29 // On Android, because of process isolation, each renderer process runs with a | 25 // On Android, because of process isolation, each renderer process runs with a |
30 // different UID. As a result, we cannot generate the minidumps in the browser | 26 // different UID. As a result, we cannot generate the minidumps in the browser |
31 // (as the browser process does not have access to some system files for the | 27 // (as the browser process does not have access to some system files for the |
32 // crashed process). So the minidump is generated in the renderer process. | 28 // crashed process). So the minidump is generated in the renderer process. |
33 // Since the isolated process cannot open files, we provide it on creation with | 29 // Since the isolated process cannot open files, we provide it on creation with |
34 // a file descriptor where to write the minidump in the event of a crash. | 30 // a file descriptor where to write the minidump in the event of a crash. |
35 // This class creates these file descriptors and associates them with render | 31 // This class creates these file descriptors and associates them with render |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 base::FilePath crash_dump_dir_; | 95 base::FilePath crash_dump_dir_; |
100 | 96 |
101 static CrashDumpManager* instance_; | 97 static CrashDumpManager* instance_; |
102 | 98 |
103 DISALLOW_COPY_AND_ASSIGN(CrashDumpManager); | 99 DISALLOW_COPY_AND_ASSIGN(CrashDumpManager); |
104 }; | 100 }; |
105 | 101 |
106 } // namespace breakpad | 102 } // namespace breakpad |
107 | 103 |
108 #endif // COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ | 104 #endif // COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ |
OLD | NEW |