Crashpad

Public Member Functions | Static Public Member Functions | List of all members
crashpad::PruneCondition Class Referenceabstract

An abstract base class for evaluating crash reports for deletion. More...

`#include "client/prune_crash_reports.h"`

Inheritance diagram for crashpad::PruneCondition:

## Public Member Functions
virtual bool | ShouldPruneReport (const CrashReportDatabase::Report &report)=0
| Evaluates a crash report for deletion. More...

## Static Public Member Functions
static std::unique_ptr< PruneCondition > | GetDefault ()
| Returns a sensible default condition for removing obsolete crash reports. More...

## Detailed Description

An abstract base class for evaluating crash reports for deletion.

When passed to PruneCrashReportDatabase(), each crash report in the database will be evaluated according to ShouldPruneReport(). The reports are evaluated serially in descending sort order by CrashReportDatabase::Report::creation_time.

## Member Function Documentation

## ◆ GetDefault()

std::unique_ptr< PruneCondition > crashpad::PruneCondition::GetDefault | ( |  | ) |
| static

Returns a sensible default condition for removing obsolete crash reports.

The default is to keep reports for one year or a maximum database size of 128 MB.

Returns
  A PruneCondition for use with PruneCrashReportDatabase().

## ◆ ShouldPruneReport()

virtual bool crashpad::PruneCondition::ShouldPruneReport | ( | const CrashReportDatabase::Report & | report | ) |
| pure virtual

Evaluates a crash report for deletion.

Parameters

  [in] | report | The crash report to evaluate.

Returns
  `true` if the crash report should be deleted, `false` if it should be kept.

Implemented in crashpad::BinaryPruneCondition, crashpad::DatabaseSizePruneCondition, and crashpad::AgePruneCondition.

The documentation for this class was generated from the following files:

- client/prune_crash_reports.h
- client/prune_crash_reports.cc