class ReportStore

Defined at line 26 of file ../../src/developer/forensics/crash_reports/report_store.h

Stores the contents of reports that have not yet been uploaded.

Public Methods

void ReportStore (LogTags * tags, std::shared_ptr<InfoContext> info_context, feedback::AnnotationManager * annotation_manager, const Root & temp_reports_root, const Root & persistent_reports_root, const std::optional<SnapshotPersistence::Root> & temp_snapshots_root, const std::optional<SnapshotPersistence::Root> & persistent_snapshots_root, const std::string & garbage_collected_snapshots_path, StorageSize max_archives_size)

|temp_reports_root| is where reports that don't need to survive a device reboot should be

stored whereas reports that need to do will be stored under |persistent_reports_root|.

Regardless of which is actually used, reports will be stored in a similar manner. For example,

if a report is filed for "foo" and it is determined that it will be stored under

|temp_reports_root|, that report will be stored in the filesystem under

|temp_reports_root|.dir/foo/

<report

ReportId>.

Defined at line 143 of file ../../src/developer/forensics/crash_reports/report_store.cc

std::optional<ItemLocation> Add (Report report, std::vector<ReportId> * garbage_collected_reports)

Adds a report to the store and returns the location of the report if it was stored.

Defined at line 168 of file ../../src/developer/forensics/crash_reports/report_store.cc

void AddAnnotation (ReportId id, const std::string & key, const std::string & value)

Adds the annotation to the report. Check-fails that an annotation for |key| doesn't already

exist.

Defined at line 283 of file ../../src/developer/forensics/crash_reports/report_store.cc

std::optional<Report> Get (ReportId id)

Gets a report from the store. If no report exists for |id| or there is an error reading the

report from the filesystem, return std::nullopt.

Defined at line 316 of file ../../src/developer/forensics/crash_reports/report_store.cc

bool Remove (ReportId id)

Returns true if a report with ReportId |id| is removed from the store.

Defined at line 410 of file ../../src/developer/forensics/crash_reports/report_store.cc

void RemoveAll ()

Defined at line 438 of file ../../src/developer/forensics/crash_reports/report_store.cc

std::vector<ReportId> GetReports ()

Defined at line 359 of file ../../src/developer/forensics/crash_reports/report_store.cc

std::vector<ReportId> GetCacheReports ()

Defined at line 367 of file ../../src/developer/forensics/crash_reports/report_store.cc

std::string GetSnapshotUuid (ReportId id)

Defined at line 369 of file ../../src/developer/forensics/crash_reports/report_store.cc

bool Contains (ReportId id)

Defined at line 392 of file ../../src/developer/forensics/crash_reports/report_store.cc

SnapshotStore * GetSnapshotStore ()

Defined at line 579 of file ../../src/developer/forensics/crash_reports/report_store.cc

Records