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

Unified Diff: chrome/browser/crash_upload_list_crashpad.cc

Issue 1830383002: Fix thread safety issues with //components/upload_list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 9 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
« no previous file with comments | « chrome/browser/crash_upload_list_crashpad.h ('k') | components/upload_list/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/crash_upload_list_crashpad.cc
diff --git a/chrome/browser/crash_upload_list_crashpad.cc b/chrome/browser/crash_upload_list_crashpad.cc
index 3e0aacabb2fe563e12cedb2bd9d019cdc3de29cf..f7d970529627a582c19bbe943723f6f6d6992f87 100644
--- a/chrome/browser/crash_upload_list_crashpad.cc
+++ b/chrome/browser/crash_upload_list_crashpad.cc
@@ -47,7 +47,8 @@ CrashUploadListCrashpad::CrashUploadListCrashpad(
CrashUploadListCrashpad::~CrashUploadListCrashpad() {}
-void CrashUploadListCrashpad::LoadUploadList() {
+void CrashUploadListCrashpad::LoadUploadList(
+ std::vector<UploadList::UploadInfo>* uploads) {
std::vector<crash_reporter::UploadedReport> uploaded_reports;
#if defined(OS_WIN)
// On Windows, we only link crash client into chrome.exe (not the dlls), and
@@ -59,10 +60,9 @@ void CrashUploadListCrashpad::LoadUploadList() {
crash_reporter::GetUploadedReports(&uploaded_reports);
#endif
- ClearUploads();
for (const crash_reporter::UploadedReport& uploaded_report :
uploaded_reports) {
- AppendUploadInfo(
+ uploads->push_back(
UploadInfo(uploaded_report.remote_id,
base::Time::FromTimeT(uploaded_report.creation_time),
uploaded_report.local_id, base::Time()));
« no previous file with comments | « chrome/browser/crash_upload_list_crashpad.h ('k') | components/upload_list/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698