Enumerations

enum ItemLocation
Name Value
kMemory 0
kCache 1
kTmp 2

Indicates where a piece of infomormation is located.

Defined at line 13 of file ../../src/developer/forensics/crash_reports/item_location.h

enum FilingResult
Name Value
kReportUploaded 0
kReportOnDisk 1
kReportInMemory 2
kReportNotFiledUserOptedOut 3
kInvalidArgsError 4
kServerError 5
kPersistenceError 6
kQuotaReachedError 7

Defined at line 16 of file ../../src/developer/forensics/crash_reports/filing_result.h

enum ReportingPolicy
Name Value
kUndecided 0
kArchive 1
kDoNotFileAndDelete 2
kUpload 3

The ReportingPolicy dictates how reports (and by extension their data) are handled by the crash

reporter. The policy dictates two things: 1) when reports are deleted and 2) whether or not

reports are eligible to be uploaded.

Defined at line 24 of file ../../src/developer/forensics/crash_reports/reporting_policy_watcher.h

Records

Functions

  • std::string ToString (ItemLocation location)

    Defined at line 11 of file ../../src/developer/forensics/crash_reports/item_location.cc

  • bool IsSpecialCaseSnapshot (const std::string & uuid)

    Returns true if |uuid| is one of the uuids for MissingSnapshots when data isn't successfully

    collected.

    Defined at line 16 of file ../../src/developer/forensics/crash_reports/snapshot.cc

  • bool operator== (const Product & a, const Product & b)

    Defined at line 20 of file ../../src/developer/forensics/crash_reports/product.cc

  • fpromise::result<fuchsia::feedback::FilingSuccess, fuchsia::feedback::FilingError> ToFidlFilingResult (FilingResult result)

    Defined at line 12 of file ../../src/developer/forensics/crash_reports/filing_result.cc

  • std::string ToString (ReportingPolicy policy)

    Defined at line 12 of file ../../src/developer/forensics/crash_reports/reporting_policy_watcher.cc

  • std::string ToReason (const Error error)

    Provide a reason why |error| occurred that is specific to feedback data collection.

    Defined at line 18 of file ../../src/developer/forensics/crash_reports/errors.h

  • std::string Shorten (std::string program_name)

    Shorten |program_name| into a shortname by removing the "fuchsia-pkg://" prefix if present and

    replacing all '/' with ':'.

    For example `fuchsia-pkg://fuchsia.com/foo-bar#meta/foo_bar.cm` becomes

    `fuchsia.com:foo-bar#meta:foo_bar.cm`.

    Defined at line 26 of file ../../src/developer/forensics/crash_reports/report_util.cc

  • std::string Logname (std::string name)

    Extract the component name without the ".cm" suffix from |name|, if one is present.

    For example `fuchsia-pkg://fuchsia.com/foo-bar#meta/foo_bar.cm` becomes

    `foo_bar`.

    Defined at line 54 of file ../../src/developer/forensics/crash_reports/report_util.cc

  • void PrintTo (const ItemLocation & location, std::ostream * os)

    Pretty-prints ItemLocation in gTest matchers instead of the default byte string in case

    of failed expectations.

    Defined at line 73 of file ../../src/developer/forensics/testing/gpretty_printers.h

  • void PrintTo (const FilingResult & result, std::ostream * os)

    Pretty-prints FilingResult in gTest matchers instead of the default byte string in case of

    failed expectations.

    Defined at line 91 of file ../../src/developer/forensics/testing/gpretty_printers.h

  • std::pair<bool, std::optional<std::string>> ParseDartModulesFromStackTrace (std::string_view stack_trace)

    Parses Dart Module information from |stack_trace|, if it is a valid, unsymbolicated Dart

    stack trace.

    The first value of the pair indicates if |stack_trace| is an unsymbolicated Dart stack trace

    (true means yes) and the second value is the module information parsed from the stack trace, if

    parsing doesn't fail. We expect symbolized and unsymbolicated stack traces so we only want to

    warn on unexpected parsing failures.

    Defined at line 118 of file ../../src/developer/forensics/crash_reports/dart_module_parser.cc

  • void PrintTo (const Product & product, std::ostream * os)

    Defined at line 122 of file ../../src/developer/forensics/testing/gpretty_printers.h

  • void PrintTo (const ReportingPolicy & policy, std::ostream * os)

    Pretty-prints ReportingPolicy in gTest matchers instead of the default byte

    string in case of failed expectations.

    Defined at line 161 of file ../../src/developer/forensics/crash_reports/tests/reporting_policy_watcher_unittest.cc

  • AnnotationMap GetReportAnnotations (const feedback::Annotations & snapshot_annotations)

    Methods to build annotations from various data collected during report creation.

    Defined at line 267 of file ../../src/developer/forensics/crash_reports/report_util.cc

  • AnnotationMap GetReportAnnotations (Product product, const AnnotationMap & annotations)

    Defined at line 251 of file ../../src/developer/forensics/crash_reports/report_util.cc

  • fpromise::result<Report> MakeReport (fuchsia::feedback::CrashReport input_reportReportId report_idconst std::string & snapshot_uuidconst feedback::Annotations & snapshot_annotationsconst std::optional<timekeeper::time_utc> & current_timeProduct productbool is_hourly_report)

    Builds the final report to add to the queue.

    * Most annotations are shared across all crash reports, e.g. the device uptime.

    * Some annotations are report-specific, e.g., Dart exception type.

    * Adds any annotations from |report|.

    * Some attachments are report-specific, e.g., Dart exception stack trace.

    * Adds any attachments from |report|.

    Defined at line 298 of file ../../src/developer/forensics/crash_reports/report_util.cc

Variables

const char[] kStubCrashServerUrl

Defined at line 17 of file ../../src/developer/forensics/crash_reports/tests/stub_crash_server.cc