Index: components/browser_watcher/postmortem_report_extractor.cc |
diff --git a/components/browser_watcher/postmortem_report_extractor.cc b/components/browser_watcher/postmortem_report_extractor.cc |
index bd12a9a03b4b87f9892195c6a3806bd1d6fce629..70c4a8d374ad43f165904420853508c92c3b5e88 100644 |
--- a/components/browser_watcher/postmortem_report_extractor.cc |
+++ b/components/browser_watcher/postmortem_report_extractor.cc |
@@ -216,8 +216,13 @@ CollectionStatus Extract(const base::FilePath& stability_file, |
// Early exit if there is no data. |
std::vector<std::string> log_messages = global_analyzer->GetLogMessages(); |
ActivityUserData::Snapshot global_data_snapshot = |
- global_analyzer->GetGlobalUserDataSnapshot(); |
- ThreadActivityAnalyzer* thread_analyzer = global_analyzer->GetFirstAnalyzer(); |
+ global_analyzer->GetGlobalDataSnapshot(); |
+ |
+ // Extract data for only the first process. |
+ // TODO(manzagop): Extend this to all processes. |
+ int64_t pid = global_analyzer->GetFirstProcess(); |
+ ThreadActivityAnalyzer* thread_analyzer = |
+ global_analyzer->GetFirstAnalyzer(pid); |
if (log_messages.empty() && global_data_snapshot.empty() && |
!thread_analyzer) { |
return DEBUG_FILE_NO_DATA; |
@@ -237,7 +242,7 @@ CollectionStatus Extract(const base::FilePath& stability_file, |
// Note: a single process is instrumented. |
ProcessState* process_state = report->add_process_states(); |
for (; thread_analyzer != nullptr; |
- thread_analyzer = global_analyzer->GetNextAnalyzer()) { |
+ thread_analyzer = global_analyzer->GetNextAnalyzer(pid)) { |
// Only valid analyzers are expected per contract of GetFirstAnalyzer / |
// GetNextAnalyzer. |
DCHECK(thread_analyzer->IsValid()); |