| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OBSERVER_ANDROID_H_ | 5 #ifndef COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_OBSERVER_ANDROID_H_ |
| 6 #define COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_OBSERVER_ANDROID_H_ | 6 #define COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_OBSERVER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // BrowserChildProcessStarted must be called from | 64 // BrowserChildProcessStarted must be called from |
| 65 // ContentBrowserClient::GetAdditionalMappedFilesForChildProcess | 65 // ContentBrowserClient::GetAdditionalMappedFilesForChildProcess |
| 66 // overrides, to notify the CrashDumpObserver of child process | 66 // overrides, to notify the CrashDumpObserver of child process |
| 67 // creation, and to allow clients to register any fd mappings they | 67 // creation, and to allow clients to register any fd mappings they |
| 68 // need. | 68 // need. |
| 69 void BrowserChildProcessStarted(int child_process_id, | 69 void BrowserChildProcessStarted(int child_process_id, |
| 70 content::FileDescriptorInfo* mappings); | 70 content::FileDescriptorInfo* mappings); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 friend struct base::DefaultLazyInstanceTraits<CrashDumpObserver>; | 73 friend struct base::LazyInstanceTraitsBase<CrashDumpObserver>; |
| 74 | 74 |
| 75 CrashDumpObserver(); | 75 CrashDumpObserver(); |
| 76 ~CrashDumpObserver() override; | 76 ~CrashDumpObserver() override; |
| 77 | 77 |
| 78 // content::BrowserChildProcessObserver implementation: | 78 // content::BrowserChildProcessObserver implementation: |
| 79 void BrowserChildProcessHostDisconnected( | 79 void BrowserChildProcessHostDisconnected( |
| 80 const content::ChildProcessData& data) override; | 80 const content::ChildProcessData& data) override; |
| 81 void BrowserChildProcessCrashed(const content::ChildProcessData& data, | 81 void BrowserChildProcessCrashed(const content::ChildProcessData& data, |
| 82 int exit_code) override; | 82 int exit_code) override; |
| 83 // On Android we will never observe BrowserChildProcessCrashed | 83 // On Android we will never observe BrowserChildProcessCrashed |
| (...skipping 19 matching lines...) Expand all Loading... |
| 103 | 103 |
| 104 // child_process_id to process id. | 104 // child_process_id to process id. |
| 105 std::map<int, base::ProcessHandle> child_process_id_to_pid_; | 105 std::map<int, base::ProcessHandle> child_process_id_to_pid_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(CrashDumpObserver); | 107 DISALLOW_COPY_AND_ASSIGN(CrashDumpObserver); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace breakpad | 110 } // namespace breakpad |
| 111 | 111 |
| 112 #endif // COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_OBSERVER_ANDROID_H_ | 112 #endif // COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_OBSERVER_ANDROID_H_ |
| OLD | NEW |