blob: 5e3cb430203ed1231753b3f3cecb97e92e6ced22 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::CrashReportDatabase Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="crashpad_doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Crashpad
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html">CrashReportDatabase</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classcrashpad_1_1CrashReportDatabase-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::CrashReportDatabase Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>An interface for managing a collection of crash report files and metadata associated with the crash reports.
<a href="classcrashpad_1_1CrashReportDatabase.html#details">More...</a></p>
<p><code>#include &quot;client/crash_report_database.h&quot;</code></p>
<div class="dynheader">
Inheritance diagram for crashpad::CrashReportDatabase:</div>
<div class="dyncontent">
<div class="center">
<img src="classcrashpad_1_1CrashReportDatabase.png" usemap="#crashpad::CrashReportDatabase_map" alt=""/>
<map id="crashpad::CrashReportDatabase_map" name="crashpad::CrashReportDatabase_map">
<area href="classcrashpad_1_1CrashReportDatabaseGeneric.html" alt="crashpad::CrashReportDatabaseGeneric" shape="rect" coords="0,56,240,80"/>
<area href="classcrashpad_1_1CrashReportDatabaseMac.html" title="A CrashReportDatabase that uses HFS+ extended attributes to store report metadata. " alt="crashpad::CrashReportDatabaseMac" shape="rect" coords="250,56,490,80"/>
<area href="classcrashpad_1_1CrashReportDatabaseWin.html" alt="crashpad::CrashReportDatabaseWin" shape="rect" coords="500,56,740,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html">NewReport</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A crash report that is in the process of being written. <a href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A crash report record. <a href="structcrashpad_1_1CrashReportDatabase_1_1Report.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html">UploadReport</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A crash report that is in the process of being uploaded. <a href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a0bbd146654537fa0cf1b576eb647bb00"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> </td></tr>
<tr class="memdesc:a0bbd146654537fa0cf1b576eb647bb00"><td class="mdescLeft">&#160;</td><td class="mdescRight">The result code for operations performed on a database. <a href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">More...</a><br /></td></tr>
<tr class="separator:a0bbd146654537fa0cf1b576eb647bb00"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a705a5c510ba8eeda15bf4fe9af6e37b1"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1Settings.html">Settings</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a705a5c510ba8eeda15bf4fe9af6e37b1">GetSettings</a> ()=0</td></tr>
<tr class="memdesc:a705a5c510ba8eeda15bf4fe9af6e37b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="classcrashpad_1_1Settings.html" title="An interface for accessing and modifying the settings of a CrashReportDatabase. ">Settings</a> object for this database. <a href="#a705a5c510ba8eeda15bf4fe9af6e37b1">More...</a><br /></td></tr>
<tr class="separator:a705a5c510ba8eeda15bf4fe9af6e37b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e40ddf9bc49998c7cd30eb4035bb23f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a2e40ddf9bc49998c7cd30eb4035bb23f">PrepareNewCrashReport</a> (std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html">NewReport</a> &gt; *report)=0</td></tr>
<tr class="memdesc:a2e40ddf9bc49998c7cd30eb4035bb23f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a record of a new crash report. <a href="#a2e40ddf9bc49998c7cd30eb4035bb23f">More...</a><br /></td></tr>
<tr class="separator:a2e40ddf9bc49998c7cd30eb4035bb23f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a346b5f90a50066d5057b4eaaacdcf3b7"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a346b5f90a50066d5057b4eaaacdcf3b7">FinishedWritingCrashReport</a> (std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html">NewReport</a> &gt; report, <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> *uuid)=0</td></tr>
<tr class="memdesc:a346b5f90a50066d5057b4eaaacdcf3b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informs the database that a crash report has been successfully written. <a href="#a346b5f90a50066d5057b4eaaacdcf3b7">More...</a><br /></td></tr>
<tr class="separator:a346b5f90a50066d5057b4eaaacdcf3b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19191932252bc836a84cf432ea8f3b7e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a19191932252bc836a84cf432ea8f3b7e">LookUpCrashReport</a> (const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;uuid, <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> *report)=0</td></tr>
<tr class="memdesc:a19191932252bc836a84cf432ea8f3b7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the crash report record for the unique identifier. <a href="#a19191932252bc836a84cf432ea8f3b7e">More...</a><br /></td></tr>
<tr class="separator:a19191932252bc836a84cf432ea8f3b7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a508353ae8893bf48a5ffcc9c74b03223"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a508353ae8893bf48a5ffcc9c74b03223">GetPendingReports</a> (std::vector&lt; <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> &gt; *reports)=0</td></tr>
<tr class="memdesc:a508353ae8893bf48a5ffcc9c74b03223"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a list of crash report records that have not been uploaded. <a href="#a508353ae8893bf48a5ffcc9c74b03223">More...</a><br /></td></tr>
<tr class="separator:a508353ae8893bf48a5ffcc9c74b03223"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aecde1673f34d7789c1b8562242223c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a3aecde1673f34d7789c1b8562242223c">GetCompletedReports</a> (std::vector&lt; <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> &gt; *reports)=0</td></tr>
<tr class="memdesc:a3aecde1673f34d7789c1b8562242223c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a list of crash report records that have been completed, either by being uploaded or by skipping upload. <a href="#a3aecde1673f34d7789c1b8562242223c">More...</a><br /></td></tr>
<tr class="separator:a3aecde1673f34d7789c1b8562242223c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa001e2fca87d2aa303334fe730955249"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#aa001e2fca87d2aa303334fe730955249">GetReportForUploading</a> (const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;uuid, std::unique_ptr&lt; const <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html">UploadReport</a> &gt; *report, bool report_metrics=true)=0</td></tr>
<tr class="memdesc:aa001e2fca87d2aa303334fe730955249"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtains and locks a report object for uploading to a collection server. <a href="#aa001e2fca87d2aa303334fe730955249">More...</a><br /></td></tr>
<tr class="separator:aa001e2fca87d2aa303334fe730955249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a329a165c28e20bc3458e697ea8778517"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a329a165c28e20bc3458e697ea8778517">RecordUploadComplete</a> (std::unique_ptr&lt; const <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html">UploadReport</a> &gt; report, const std::string &amp;id)</td></tr>
<tr class="memdesc:a329a165c28e20bc3458e697ea8778517"><td class="mdescLeft">&#160;</td><td class="mdescRight">Records a successful upload for a report and updates the last upload attempt time as returned by <a class="el" href="classcrashpad_1_1Settings.html#a855f61d6fc73042dcb886ef40d8e4429" title="Retrieves the last time at which a report was attempted to be uploaded. ">Settings::GetLastUploadAttemptTime()</a>. <a href="#a329a165c28e20bc3458e697ea8778517">More...</a><br /></td></tr>
<tr class="separator:a329a165c28e20bc3458e697ea8778517"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0869a26352d37e7f99d9b520f6d07cd"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#ab0869a26352d37e7f99d9b520f6d07cd">SkipReportUpload</a> (const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;uuid, <a class="el" href="classcrashpad_1_1Metrics.html#aa27da6c2bda5b2982fcb636786053c0d">Metrics::CrashSkippedReason</a> reason)=0</td></tr>
<tr class="memdesc:ab0869a26352d37e7f99d9b520f6d07cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves a report from the pending state to the completed state, but without the report being uploaded. <a href="#ab0869a26352d37e7f99d9b520f6d07cd">More...</a><br /></td></tr>
<tr class="separator:ab0869a26352d37e7f99d9b520f6d07cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8aff03198b18b5dc479c189115500c4"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#aa8aff03198b18b5dc479c189115500c4">DeleteReport</a> (const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;uuid)=0</td></tr>
<tr class="memdesc:aa8aff03198b18b5dc479c189115500c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a crash report file and its associated metadata. <a href="#aa8aff03198b18b5dc479c189115500c4">More...</a><br /></td></tr>
<tr class="separator:aa8aff03198b18b5dc479c189115500c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c195d0ba0155e3692be1bdb4bb79fc6"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a4c195d0ba0155e3692be1bdb4bb79fc6">RequestUpload</a> (const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;uuid)=0</td></tr>
<tr class="memdesc:a4c195d0ba0155e3692be1bdb4bb79fc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Marks a crash report as explicitly requested to be uploaded by the user and moves it to 'pending' state. <a href="#a4c195d0ba0155e3692be1bdb4bb79fc6">More...</a><br /></td></tr>
<tr class="separator:a4c195d0ba0155e3692be1bdb4bb79fc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af06b2b1312d8a824559d99232a173576"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#af06b2b1312d8a824559d99232a173576">CleanDatabase</a> (time_t lockfile_ttl)</td></tr>
<tr class="memdesc:af06b2b1312d8a824559d99232a173576"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cleans the database of expired lockfiles, metadata without report files, and report files without metadata. <a href="#af06b2b1312d8a824559d99232a173576">More...</a><br /></td></tr>
<tr class="separator:af06b2b1312d8a824559d99232a173576"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a00292742dfe4c0081d6987c5a32c7a3e"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase.html">CrashReportDatabase</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a00292742dfe4c0081d6987c5a32c7a3e">Initialize</a> (const base::FilePath &amp;path)</td></tr>
<tr class="memdesc:a00292742dfe4c0081d6987c5a32c7a3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a database of crash reports, possibly creating it. <a href="#a00292742dfe4c0081d6987c5a32c7a3e">More...</a><br /></td></tr>
<tr class="separator:a00292742dfe4c0081d6987c5a32c7a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc49f639a5880f51c7d69b955a3deae7"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase.html">CrashReportDatabase</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#abc49f639a5880f51c7d69b955a3deae7">InitializeWithoutCreating</a> (const base::FilePath &amp;path)</td></tr>
<tr class="memdesc:abc49f639a5880f51c7d69b955a3deae7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens an existing database of crash reports. <a href="#abc49f639a5880f51c7d69b955a3deae7">More...</a><br /></td></tr>
<tr class="separator:abc49f639a5880f51c7d69b955a3deae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An interface for managing a collection of crash report files and metadata associated with the crash reports. </p>
<p>All <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html" title="A crash report record. ">Report</a> objects that are returned by this class are logically const. They are snapshots of the database at the time the query was run, and the data returned is liable to change after the query is executed.</p>
<p>The lifecycle of a crash report has three stages:</p>
<ol type="1">
<li>New: A crash report is created with <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a2e40ddf9bc49998c7cd30eb4035bb23f" title="Creates a record of a new crash report. ">PrepareNewCrashReport()</a>, the the client then writes the report, and then calls <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a346b5f90a50066d5057b4eaaacdcf3b7" title="Informs the database that a crash report has been successfully written. ">FinishedWritingCrashReport()</a> to make the report Pending.</li>
<li>Pending: The report has been written but has not been locally processed, or it was has been brought back from 'Completed' state by user request.</li>
<li>Completed: The report has been locally processed, either by uploading it to a collection server and calling <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a329a165c28e20bc3458e697ea8778517" title="Records a successful upload for a report and updates the last upload attempt time as returned by Sett...">RecordUploadComplete()</a>, or by calling <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#ab0869a26352d37e7f99d9b520f6d07cd" title="Moves a report from the pending state to the completed state, but without the report being uploaded...">SkipReportUpload()</a>. </li>
</ol>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a0bbd146654537fa0cf1b576eb647bb00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bbd146654537fa0cf1b576eb647bb00">&#9670;&nbsp;</a></span>OperationStatus</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">crashpad::CrashReportDatabase::OperationStatus</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>The result code for operations performed on a database. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a0bbd146654537fa0cf1b576eb647bb00ad73503b93bff6f4ae156a65fcb5e71f8"></a>kNoError&#160;</td><td class="fielddoc"><p>No error occurred. </p>
</td></tr>
<tr><td class="fieldname"><a id="a0bbd146654537fa0cf1b576eb647bb00ab005def710dfeef7c3f3fd6c7e615239"></a>kReportNotFound&#160;</td><td class="fielddoc"><p>The report that was requested could not be located. </p>
<p>This may occur when the report is present in the database but not in a state appropriate for the requested operation, for example, if <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#aa001e2fca87d2aa303334fe730955249" title="Obtains and locks a report object for uploading to a collection server. ">GetReportForUploading()</a> is called to obtain report that’s already in the completed state. </p>
</td></tr>
<tr><td class="fieldname"><a id="a0bbd146654537fa0cf1b576eb647bb00ad40b3e9919ed7de952a4e30d5be5c59b"></a>kFileSystemError&#160;</td><td class="fielddoc"><p>An error occured while performing a file operation on a crash report. </p>
<p>A database is responsible for managing both the metadata about a report and the actual crash report itself. This error is returned when an error occurred when managing the report file. Additional information will be logged. </p>
</td></tr>
<tr><td class="fieldname"><a id="a0bbd146654537fa0cf1b576eb647bb00a3b98980ca5f43ea58da77b58e718a9c5"></a>kDatabaseError&#160;</td><td class="fielddoc"><p>An error occured while recording metadata for a crash report or database-wide settings. </p>
<p>A database is responsible for managing both the metadata about a report and the actual crash report itself. This error is returned when an error occurred when managing the metadata about a crash report or database-wide settings. Additional information will be logged. </p>
</td></tr>
<tr><td class="fieldname"><a id="a0bbd146654537fa0cf1b576eb647bb00a5144543522e789911f7c8e0e34807961"></a>kBusyError&#160;</td><td class="fielddoc"><p>The operation could not be completed because a concurrent operation affecting the report is occurring. </p>
</td></tr>
<tr><td class="fieldname"><a id="a0bbd146654537fa0cf1b576eb647bb00a11d438c5b7fd00ea52a6968871ab7a6e"></a>kCannotRequestUpload&#160;</td><td class="fielddoc"><p>The report cannot be uploaded by user request as it has already been uploaded. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af06b2b1312d8a824559d99232a173576"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af06b2b1312d8a824559d99232a173576">&#9670;&nbsp;</a></span>CleanDatabase()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int crashpad::CrashReportDatabase::CleanDatabase </td>
<td>(</td>
<td class="paramtype">time_t&#160;</td>
<td class="paramname"><em>lockfile_ttl</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Cleans the database of expired lockfiles, metadata without report files, and report files without metadata. </p>
<p>This method does nothing on the macOS and Windows implementations of the database.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lockfile_ttl</td><td>The number of seconds at which lockfiles or new report files are considered expired. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of reports cleaned. </dd></dl>
<p>Reimplemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a5f9b808bc4840db00cac1070102aeb2c">crashpad::CrashReportDatabaseGeneric</a>.</p>
</div>
</div>
<a id="aa8aff03198b18b5dc479c189115500c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8aff03198b18b5dc479c189115500c4">&#9670;&nbsp;</a></span>DeleteReport()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::DeleteReport </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Deletes a crash report file and its associated metadata. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The <a class="el" href="structcrashpad_1_1UUID.html" title="A universally unique identifier (UUID). ">UUID</a> of the report to delete.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a8d00c5da892c1fc2abf10b1a7180adbe">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a13bd4a9b11a9219a4618c1f93bd1ff3c">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#ab33eac7ac70f94627d750d2bf3d9ba4a">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="a346b5f90a50066d5057b4eaaacdcf3b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a346b5f90a50066d5057b4eaaacdcf3b7">&#9670;&nbsp;</a></span>FinishedWritingCrashReport()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::FinishedWritingCrashReport </td>
<td>(</td>
<td class="paramtype">std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html">NewReport</a> &gt;&#160;</td>
<td class="paramname"><em>report</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structcrashpad_1_1UUID.html">UUID</a> *&#160;</td>
<td class="paramname"><em>uuid</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Informs the database that a crash report has been successfully written. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">report</td><td>A <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html" title="A crash report that is in the process of being written. ">NewReport</a> obtained with <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a2e40ddf9bc49998c7cd30eb4035bb23f" title="Creates a record of a new crash report. ">PrepareNewCrashReport()</a>. The <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html" title="A crash report that is in the process of being written. ">NewReport</a> object will be invalidated as part of this call. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">uuid</td><td>The <a class="el" href="structcrashpad_1_1UUID.html" title="A universally unique identifier (UUID). ">UUID</a> of this crash report.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a3f92307c8d84d5a0822d7412db997cf6">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a81da0d483b8c69b8baa636c1a6ad4dae">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a21779f103f618f0fa97d8cbe6f5ea936">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="a3aecde1673f34d7789c1b8562242223c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aecde1673f34d7789c1b8562242223c">&#9670;&nbsp;</a></span>GetCompletedReports()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::GetCompletedReports </td>
<td>(</td>
<td class="paramtype">std::vector&lt; <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> &gt; *&#160;</td>
<td class="paramname"><em>reports</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a list of crash report records that have been completed, either by being uploaded or by skipping upload. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">reports</td><td>A list of crash report record objects. This must be empty on entry. Only valid if this returns <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00ad73503b93bff6f4ae156a65fcb5e71f8" title="No error occurred. ">kNoError</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#ac70f0365623f26abcaf8a1eced25dbc8">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a59211bd411d4f4438c4686e57d0e527c">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#ac05cc3c5354619cb3d17aaee8209fa54">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="a508353ae8893bf48a5ffcc9c74b03223"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a508353ae8893bf48a5ffcc9c74b03223">&#9670;&nbsp;</a></span>GetPendingReports()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::GetPendingReports </td>
<td>(</td>
<td class="paramtype">std::vector&lt; <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> &gt; *&#160;</td>
<td class="paramname"><em>reports</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a list of crash report records that have not been uploaded. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">reports</td><td>A list of crash report record objects. This must be empty on entry. Only valid if this returns <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00ad73503b93bff6f4ae156a65fcb5e71f8" title="No error occurred. ">kNoError</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a16ddf168ba04b4e889a18882b5a7e280">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a8cdc4769b0d7a0964ea9fa5584ba05e9">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#aa6ad8f281d825122e9a9872c82612d0e">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="aa001e2fca87d2aa303334fe730955249"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa001e2fca87d2aa303334fe730955249">&#9670;&nbsp;</a></span>GetReportForUploading()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::GetReportForUploading </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::unique_ptr&lt; const <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html">UploadReport</a> &gt; *&#160;</td>
<td class="paramname"><em>report</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>report_metrics</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Obtains and locks a report object for uploading to a collection server. </p>
<p>Callers should upload the crash report using the <a class="el" href="classcrashpad_1_1FileReader.html" title="A file reader implementation that wraps traditional system file operations on files accessed through ...">FileReader</a> provided. Callers should then call <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a329a165c28e20bc3458e697ea8778517" title="Records a successful upload for a report and updates the last upload attempt time as returned by Sett...">RecordUploadComplete()</a> to record a successful upload. If <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a329a165c28e20bc3458e697ea8778517" title="Records a successful upload for a report and updates the last upload attempt time as returned by Sett...">RecordUploadComplete()</a> is not called, the upload attempt will be recorded as unsuccessful and the report lock released when <em>report</em> is destroyed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The unique identifier for the crash report record. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">report</td><td>A crash report record for the report to be uploaded. Only valid if this returns <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00ad73503b93bff6f4ae156a65fcb5e71f8" title="No error occurred. ">kNoError</a>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">report_metrics</td><td>If <code>false</code>, metrics will not be recorded for this upload attempt when <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a329a165c28e20bc3458e697ea8778517" title="Records a successful upload for a report and updates the last upload attempt time as returned by Sett...">RecordUploadComplete()</a> is called or <em>report</em> is destroyed. Metadata for the upload attempt will still be recorded in the database.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a34ec65f696f0284ac0890dc268902154">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a4204cbbd07f3b8e58c4ef193e696d7c9">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#aa30fc6ae311130ee5702ad4e0b3fc099">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="a705a5c510ba8eeda15bf4fe9af6e37b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a705a5c510ba8eeda15bf4fe9af6e37b1">&#9670;&nbsp;</a></span>GetSettings()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1Settings.html">Settings</a>* crashpad::CrashReportDatabase::GetSettings </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the <a class="el" href="classcrashpad_1_1Settings.html" title="An interface for accessing and modifying the settings of a CrashReportDatabase. ">Settings</a> object for this database. </p>
<dl class="section return"><dt>Returns</dt><dd>A weak pointer to the <a class="el" href="classcrashpad_1_1Settings.html" title="An interface for accessing and modifying the settings of a CrashReportDatabase. ">Settings</a> object, which is owned by the database. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a6937857d53e9e7de656cb5388d91a1d0">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a91406c5fbec397b15aac2b0964e9d53e">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a2e42d9d3d4d9f96285ba504d7668a34b">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="a00292742dfe4c0081d6987c5a32c7a3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00292742dfe4c0081d6987c5a32c7a3e">&#9670;&nbsp;</a></span>Initialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase.html">CrashReportDatabase</a> &gt; crashpad::CrashReportDatabase::Initialize </td>
<td>(</td>
<td class="paramtype">const base::FilePath &amp;&#160;</td>
<td class="paramname"><em>path</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Opens a database of crash reports, possibly creating it. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path to the database to be created or opened. If the database does not yet exist, it will be created if possible. Note that for databases implemented as directory structures, existence refers solely to the outermost directory.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A database object on success, <code>nullptr</code> on failure with an error logged.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#abc49f639a5880f51c7d69b955a3deae7" title="Opens an existing database of crash reports. ">InitializeWithoutCreating</a> </dd></dl>
</div>
</div>
<a id="abc49f639a5880f51c7d69b955a3deae7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc49f639a5880f51c7d69b955a3deae7">&#9670;&nbsp;</a></span>InitializeWithoutCreating()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase.html">CrashReportDatabase</a> &gt; crashpad::CrashReportDatabase::InitializeWithoutCreating </td>
<td>(</td>
<td class="paramtype">const base::FilePath &amp;&#160;</td>
<td class="paramname"><em>path</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Opens an existing database of crash reports. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path to the database to be opened. If the database does not yet exist, it will not be created. Note that for databases implemented as directory structures, existence refers solely to the outermost directory. On such databases, as long as the outermost directory is present, this method will create the inner structure.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A database object on success, <code>nullptr</code> on failure with an error logged.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a00292742dfe4c0081d6987c5a32c7a3e" title="Opens a database of crash reports, possibly creating it. ">Initialize</a> </dd></dl>
</div>
</div>
<a id="a19191932252bc836a84cf432ea8f3b7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19191932252bc836a84cf432ea8f3b7e">&#9670;&nbsp;</a></span>LookUpCrashReport()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::LookUpCrashReport </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> *&#160;</td>
<td class="paramname"><em>report</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the crash report record for the unique identifier. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The crash report record unique identifier. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">report</td><td>A crash report record. Only valid if this returns <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00ad73503b93bff6f4ae156a65fcb5e71f8" title="No error occurred. ">kNoError</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a169d708e76fff838309dfa46095a04e7">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a0694c0d8f7758f990f653d542dd8986c">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a17f445e44bd09f86b352fa5846e9ff35">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="a2e40ddf9bc49998c7cd30eb4035bb23f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e40ddf9bc49998c7cd30eb4035bb23f">&#9670;&nbsp;</a></span>PrepareNewCrashReport()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::PrepareNewCrashReport </td>
<td>(</td>
<td class="paramtype">std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html">NewReport</a> &gt; *&#160;</td>
<td class="paramname"><em>report</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a record of a new crash report. </p>
<p>Callers should write the crash report using the <a class="el" href="classcrashpad_1_1FileWriter.html" title="A file writer implementation that wraps traditional system file operations on files accessed through ...">FileWriter</a> provided. Callers should then call <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a346b5f90a50066d5057b4eaaacdcf3b7" title="Informs the database that a crash report has been successfully written. ">FinishedWritingCrashReport()</a> to complete report creation. If an error is encountered while writing the crash report, no special action needs to be taken. If <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a346b5f90a50066d5057b4eaaacdcf3b7" title="Informs the database that a crash report has been successfully written. ">FinishedWritingCrashReport()</a> is not called, the report will be removed from the database when <em>report</em> is destroyed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">report</td><td>A <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html" title="A crash report that is in the process of being written. ">NewReport</a> object containing a <a class="el" href="classcrashpad_1_1FileWriter.html" title="A file writer implementation that wraps traditional system file operations on files accessed through ...">FileWriter</a> with which to write the report data. Only valid if this returns <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00ad73503b93bff6f4ae156a65fcb5e71f8" title="No error occurred. ">kNoError</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a6da9af1cdc7e3f3bd24a52be280e1371">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#aa79e8766d90501fc06adb3ff934e1d12">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a0929c775c77975671805a06ed790afaf">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="a329a165c28e20bc3458e697ea8778517"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a329a165c28e20bc3458e697ea8778517">&#9670;&nbsp;</a></span>RecordUploadComplete()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabase::RecordUploadComplete </td>
<td>(</td>
<td class="paramtype">std::unique_ptr&lt; const <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html">UploadReport</a> &gt;&#160;</td>
<td class="paramname"><em>report</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Records a successful upload for a report and updates the last upload attempt time as returned by <a class="el" href="classcrashpad_1_1Settings.html#a855f61d6fc73042dcb886ef40d8e4429" title="Retrieves the last time at which a report was attempted to be uploaded. ">Settings::GetLastUploadAttemptTime()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">report</td><td>A <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html" title="A crash report that is in the process of being uploaded. ">UploadReport</a> object obtained from <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#aa001e2fca87d2aa303334fe730955249" title="Obtains and locks a report object for uploading to a collection server. ">GetReportForUploading()</a>. The <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1UploadReport.html" title="A crash report that is in the process of being uploaded. ">UploadReport</a> object will be invalidated and the report unlocked as part of this call. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>The possibly empty identifier assigned to this crash report by the collection server.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
</div>
</div>
<a id="a4c195d0ba0155e3692be1bdb4bb79fc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c195d0ba0155e3692be1bdb4bb79fc6">&#9670;&nbsp;</a></span>RequestUpload()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::RequestUpload </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Marks a crash report as explicitly requested to be uploaded by the user and moves it to 'pending' state. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The unique identifier for the crash report record.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#aa241dbd8fcd739370b79b87ffee4ac86">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a6deed32774a49b84c0df5103739cb21e">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a5c2c91bc0a68ba9cf9f09cad8268257f">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<a id="ab0869a26352d37e7f99d9b520f6d07cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0869a26352d37e7f99d9b520f6d07cd">&#9670;&nbsp;</a></span>SkipReportUpload()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">OperationStatus</a> crashpad::CrashReportDatabase::SkipReportUpload </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1Metrics.html#aa27da6c2bda5b2982fcb636786053c0d">Metrics::CrashSkippedReason</a>&#160;</td>
<td class="paramname"><em>reason</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Moves a report from the pending state to the completed state, but without the report being uploaded. </p>
<p>This can be used if the user has disabled crash report collection, but crash generation is still enabled in the product.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The unique identifier for the crash report record. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">reason</td><td>The reason the report upload is being skipped for metrics tracking purposes.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The operation status code. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1CrashReportDatabaseWin.html#a5a26772b33767a3e9f6bf56c40a4440b">crashpad::CrashReportDatabaseWin</a>, <a class="el" href="classcrashpad_1_1CrashReportDatabaseGeneric.html#a5be2c76566de31d9ae8fd632e1b4fe7e">crashpad::CrashReportDatabaseGeneric</a>, and <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a5a92b53f409c4d360403b00aa5aaa8fe">crashpad::CrashReportDatabaseMac</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>client/crash_report_database.h</li>
<li>client/crash_report_database.cc</li>
<li>client/crash_report_database_generic.cc</li>
<li>client/crash_report_database_mac.mm</li>
<li>client/crash_report_database_win.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>