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

Unified Diff: client/crash_report_database_mac.mm

Issue 995853003: CrashReportDatabse: set the last upload attempt time from RecordUploadAttempt() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Windows Created 5 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 | « client/crash_report_database.h ('k') | client/crash_report_database_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/crash_report_database_mac.mm
diff --git a/client/crash_report_database_mac.mm b/client/crash_report_database_mac.mm
index 75f63f47e573fb075563e68eccf2ca4db546335d..ffa7b2b66f76aba11047952689f02a7d7667636f 100644
--- a/client/crash_report_database_mac.mm
+++ b/client/crash_report_database_mac.mm
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <time.h>
#include <unistd.h>
#include <uuid/uuid.h>
@@ -399,9 +400,9 @@ CrashReportDatabaseMac::RecordUploadAttempt(const Report* report,
if (!WriteXattr(report_path, XattrName(kXattrCollectorID), id)) {
return kDatabaseError;
}
- if (!WriteXattrTimeT(report_path,
- XattrName(kXattrLastUploadTime),
- time(nullptr))) {
+
+ time_t now = time(nullptr);
+ if (!WriteXattrTimeT(report_path, XattrName(kXattrLastUploadTime), now)) {
return kDatabaseError;
}
@@ -415,6 +416,10 @@ CrashReportDatabaseMac::RecordUploadAttempt(const Report* report,
return kDatabaseError;
}
+ if (!settings_.SetLastUploadAttemptTime(now)) {
+ return kDatabaseError;
+ }
+
return kNoError;
}
« no previous file with comments | « client/crash_report_database.h ('k') | client/crash_report_database_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698