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

Unified Diff: components/browser_watcher/postmortem_report_extractor.cc

Issue 2753573002: Remove 'global' user-data in favor of 'process' user-data. (Closed)
Patch Set: rebased Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
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 c5f2b3c42047453d0f3cfc7528a318f98393d6ac..d21abae3697858ee993d57178e52667bf8ef643b 100644
--- a/components/browser_watcher/postmortem_report_extractor.cc
+++ b/components/browser_watcher/postmortem_report_extractor.cc
@@ -213,17 +213,18 @@ CollectionStatus Extract(const base::FilePath& stability_file,
if (!global_analyzer)
return ANALYZER_CREATION_FAILED;
- // Early exit if there is no data.
- std::vector<std::string> log_messages = global_analyzer->GetLogMessages();
- ActivityUserData::Snapshot global_data_snapshot =
- global_analyzer->GetGlobalDataSnapshot();
-
// Extract data for only the first process.
// TODO(manzagop): Extend this to all processes.
int64_t pid = global_analyzer->GetFirstProcess();
+
+ // Early exit if there is no data.
+ std::vector<std::string> log_messages = global_analyzer->GetLogMessages();
+ ActivityUserData::Snapshot process_data_snapshot =
+ global_analyzer->GetProcessDataSnapshot(pid);
+
ThreadActivityAnalyzer* thread_analyzer =
global_analyzer->GetFirstAnalyzer(pid);
- if (log_messages.empty() && global_data_snapshot.empty() &&
+ if (log_messages.empty() && process_data_snapshot.empty() &&
!thread_analyzer) {
return DEBUG_FILE_NO_DATA;
}
@@ -236,7 +237,7 @@ CollectionStatus Extract(const base::FilePath& stability_file,
// Collect global user data.
google::protobuf::Map<std::string, TypedValue>& global_data =
*(report->mutable_global_data());
- CollectUserData(global_data_snapshot, &global_data, report);
+ CollectUserData(process_data_snapshot, &global_data, report);
// Collect thread activity data.
// Note: a single process is instrumented.
« no previous file with comments | « components/browser_watcher/postmortem_report_collector_unittest.cc ('k') | components/browser_watcher/stability_debugging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698