blob: d3f055ef4decd6f5f0211e788632135ee86eed26 [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::CrashReportDatabaseMac 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_1CrashReportDatabaseMac.html">CrashReportDatabaseMac</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcrashpad_1_1CrashReportDatabaseMac-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::CrashReportDatabaseMac Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A <a class="el" href="classcrashpad_1_1CrashReportDatabase.html" title="An interface for managing a collection of crash report files and metadata associated with the crash r...">CrashReportDatabase</a> that uses HFS+ extended attributes to store report metadata.
<a href="classcrashpad_1_1CrashReportDatabaseMac.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for crashpad::CrashReportDatabaseMac:</div>
<div class="dyncontent">
<div class="center">
<img src="classcrashpad_1_1CrashReportDatabaseMac.png" usemap="#crashpad::CrashReportDatabaseMac_map" alt=""/>
<map id="crashpad::CrashReportDatabaseMac_map" name="crashpad::CrashReportDatabaseMac_map">
<area href="classcrashpad_1_1CrashReportDatabase.html" title="An interface for managing a collection of crash report files and metadata associated with the crash r..." alt="crashpad::CrashReportDatabase" shape="rect" coords="0,0,220,24"/>
</map>
</div></div>
<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:a004b3a6c41c7ee920568001c5ec93b61"><td class="memItemLeft" align="right" valign="top"><a id="a004b3a6c41c7ee920568001c5ec93b61"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>CrashReportDatabaseMac</b> (const base::FilePath &amp;path)</td></tr>
<tr class="separator:a004b3a6c41c7ee920568001c5ec93b61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a792d13d2bdc182bef33e84076303f17a"><td class="memItemLeft" align="right" valign="top"><a id="a792d13d2bdc182bef33e84076303f17a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Initialize</b> (bool may_create)</td></tr>
<tr class="separator:a792d13d2bdc182bef33e84076303f17a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e42d9d3d4d9f96285ba504d7668a34b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcrashpad_1_1Settings.html">Settings</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a2e42d9d3d4d9f96285ba504d7668a34b">GetSettings</a> () override</td></tr>
<tr class="memdesc:a2e42d9d3d4d9f96285ba504d7668a34b"><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="#a2e42d9d3d4d9f96285ba504d7668a34b">More...</a><br /></td></tr>
<tr class="separator:a2e42d9d3d4d9f96285ba504d7668a34b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0929c775c77975671805a06ed790afaf"><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_1CrashReportDatabaseMac.html#a0929c775c77975671805a06ed790afaf">PrepareNewCrashReport</a> (std::unique_ptr&lt; <a class="el" href="classcrashpad_1_1CrashReportDatabase_1_1NewReport.html">NewReport</a> &gt; *report) override</td></tr>
<tr class="memdesc:a0929c775c77975671805a06ed790afaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a record of a new crash report. <a href="#a0929c775c77975671805a06ed790afaf">More...</a><br /></td></tr>
<tr class="separator:a0929c775c77975671805a06ed790afaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21779f103f618f0fa97d8cbe6f5ea936"><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_1CrashReportDatabaseMac.html#a21779f103f618f0fa97d8cbe6f5ea936">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) override</td></tr>
<tr class="memdesc:a21779f103f618f0fa97d8cbe6f5ea936"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informs the database that a crash report has been successfully written. <a href="#a21779f103f618f0fa97d8cbe6f5ea936">More...</a><br /></td></tr>
<tr class="separator:a21779f103f618f0fa97d8cbe6f5ea936"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17f445e44bd09f86b352fa5846e9ff35"><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_1CrashReportDatabaseMac.html#a17f445e44bd09f86b352fa5846e9ff35">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) override</td></tr>
<tr class="memdesc:a17f445e44bd09f86b352fa5846e9ff35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the crash report record for the unique identifier. <a href="#a17f445e44bd09f86b352fa5846e9ff35">More...</a><br /></td></tr>
<tr class="separator:a17f445e44bd09f86b352fa5846e9ff35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6ad8f281d825122e9a9872c82612d0e"><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_1CrashReportDatabaseMac.html#aa6ad8f281d825122e9a9872c82612d0e">GetPendingReports</a> (std::vector&lt; <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> &gt; *reports) override</td></tr>
<tr class="memdesc:aa6ad8f281d825122e9a9872c82612d0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a list of crash report records that have not been uploaded. <a href="#aa6ad8f281d825122e9a9872c82612d0e">More...</a><br /></td></tr>
<tr class="separator:aa6ad8f281d825122e9a9872c82612d0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac05cc3c5354619cb3d17aaee8209fa54"><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_1CrashReportDatabaseMac.html#ac05cc3c5354619cb3d17aaee8209fa54">GetCompletedReports</a> (std::vector&lt; <a class="el" href="structcrashpad_1_1CrashReportDatabase_1_1Report.html">Report</a> &gt; *reports) override</td></tr>
<tr class="memdesc:ac05cc3c5354619cb3d17aaee8209fa54"><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="#ac05cc3c5354619cb3d17aaee8209fa54">More...</a><br /></td></tr>
<tr class="separator:ac05cc3c5354619cb3d17aaee8209fa54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa30fc6ae311130ee5702ad4e0b3fc099"><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_1CrashReportDatabaseMac.html#aa30fc6ae311130ee5702ad4e0b3fc099">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) override</td></tr>
<tr class="memdesc:aa30fc6ae311130ee5702ad4e0b3fc099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtains and locks a report object for uploading to a collection server. <a href="#aa30fc6ae311130ee5702ad4e0b3fc099">More...</a><br /></td></tr>
<tr class="separator:aa30fc6ae311130ee5702ad4e0b3fc099"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a92b53f409c4d360403b00aa5aaa8fe"><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_1CrashReportDatabaseMac.html#a5a92b53f409c4d360403b00aa5aaa8fe">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) override</td></tr>
<tr class="memdesc:a5a92b53f409c4d360403b00aa5aaa8fe"><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="#a5a92b53f409c4d360403b00aa5aaa8fe">More...</a><br /></td></tr>
<tr class="separator:a5a92b53f409c4d360403b00aa5aaa8fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab33eac7ac70f94627d750d2bf3d9ba4a"><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_1CrashReportDatabaseMac.html#ab33eac7ac70f94627d750d2bf3d9ba4a">DeleteReport</a> (const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;uuid) override</td></tr>
<tr class="memdesc:ab33eac7ac70f94627d750d2bf3d9ba4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a crash report file and its associated metadata. <a href="#ab33eac7ac70f94627d750d2bf3d9ba4a">More...</a><br /></td></tr>
<tr class="separator:ab33eac7ac70f94627d750d2bf3d9ba4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c2c91bc0a68ba9cf9f09cad8268257f"><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_1CrashReportDatabaseMac.html#a5c2c91bc0a68ba9cf9f09cad8268257f">RequestUpload</a> (const <a class="el" href="structcrashpad_1_1UUID.html">UUID</a> &amp;uuid) override</td></tr>
<tr class="memdesc:a5c2c91bc0a68ba9cf9f09cad8268257f"><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="#a5c2c91bc0a68ba9cf9f09cad8268257f">More...</a><br /></td></tr>
<tr class="separator:a5c2c91bc0a68ba9cf9f09cad8268257f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcrashpad_1_1CrashReportDatabase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcrashpad_1_1CrashReportDatabase')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classcrashpad_1_1CrashReportDatabase.html">crashpad::CrashReportDatabase</a></td></tr>
<tr class="memitem:a329a165c28e20bc3458e697ea8778517 inherit pub_methods_classcrashpad_1_1CrashReportDatabase"><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 inherit pub_methods_classcrashpad_1_1CrashReportDatabase"><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="classcrashpad_1_1CrashReportDatabase.html#a329a165c28e20bc3458e697ea8778517">More...</a><br /></td></tr>
<tr class="separator:a329a165c28e20bc3458e697ea8778517 inherit pub_methods_classcrashpad_1_1CrashReportDatabase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af06b2b1312d8a824559d99232a173576 inherit pub_methods_classcrashpad_1_1CrashReportDatabase"><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 inherit pub_methods_classcrashpad_1_1CrashReportDatabase"><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="classcrashpad_1_1CrashReportDatabase.html#af06b2b1312d8a824559d99232a173576">More...</a><br /></td></tr>
<tr class="separator:af06b2b1312d8a824559d99232a173576 inherit pub_methods_classcrashpad_1_1CrashReportDatabase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classcrashpad_1_1CrashReportDatabase"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classcrashpad_1_1CrashReportDatabase')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classcrashpad_1_1CrashReportDatabase.html">crashpad::CrashReportDatabase</a></td></tr>
<tr class="memitem:a0bbd146654537fa0cf1b576eb647bb00 inherit pub_types_classcrashpad_1_1CrashReportDatabase"><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 inherit pub_types_classcrashpad_1_1CrashReportDatabase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classcrashpad_1_1CrashReportDatabase"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcrashpad_1_1CrashReportDatabase')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classcrashpad_1_1CrashReportDatabase.html">crashpad::CrashReportDatabase</a></td></tr>
<tr class="memitem:a00292742dfe4c0081d6987c5a32c7a3e inherit pub_static_methods_classcrashpad_1_1CrashReportDatabase"><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 inherit pub_static_methods_classcrashpad_1_1CrashReportDatabase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a database of crash reports, possibly creating it. <a href="classcrashpad_1_1CrashReportDatabase.html#a00292742dfe4c0081d6987c5a32c7a3e">More...</a><br /></td></tr>
<tr class="separator:a00292742dfe4c0081d6987c5a32c7a3e inherit pub_static_methods_classcrashpad_1_1CrashReportDatabase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc49f639a5880f51c7d69b955a3deae7 inherit pub_static_methods_classcrashpad_1_1CrashReportDatabase"><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 inherit pub_static_methods_classcrashpad_1_1CrashReportDatabase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens an existing database of crash reports. <a href="classcrashpad_1_1CrashReportDatabase.html#abc49f639a5880f51c7d69b955a3deae7">More...</a><br /></td></tr>
<tr class="separator:abc49f639a5880f51c7d69b955a3deae7 inherit pub_static_methods_classcrashpad_1_1CrashReportDatabase"><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>A <a class="el" href="classcrashpad_1_1CrashReportDatabase.html" title="An interface for managing a collection of crash report files and metadata associated with the crash r...">CrashReportDatabase</a> that uses HFS+ extended attributes to store report metadata. </p>
<p>The database maintains three directories of reports: <code>"new"</code> to hold crash reports that are in the process of being written, <code>"completed"</code> to hold reports that have been written and are awaiting upload, and <code>"uploaded"</code> to hold reports successfully uploaded to a collection server. If the user has opted out of report collection, reports will still be written and moved to the completed directory, but they just will not be uploaded.</p>
<p>The database stores its metadata in extended filesystem attributes. To ensure safe access, the report file is locked using <code>O_EXLOCK</code> during all extended attribute operations. The lock should be obtained using ObtainReportLock(). </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ab33eac7ac70f94627d750d2bf3d9ba4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab33eac7ac70f94627d750d2bf3d9ba4a">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#aa8aff03198b18b5dc479c189115500c4">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="a21779f103f618f0fa97d8cbe6f5ea936"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21779f103f618f0fa97d8cbe6f5ea936">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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 NewReport obtained with <a class="el" href="classcrashpad_1_1CrashReportDatabaseMac.html#a0929c775c77975671805a06ed790afaf" title="Creates a record of a new crash report. ">PrepareNewCrashReport()</a>. The NewReport 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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a346b5f90a50066d5057b4eaaacdcf3b7">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="ac05cc3c5354619cb3d17aaee8209fa54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac05cc3c5354619cb3d17aaee8209fa54">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a3aecde1673f34d7789c1b8562242223c">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="aa6ad8f281d825122e9a9872c82612d0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6ad8f281d825122e9a9872c82612d0e">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a508353ae8893bf48a5ffcc9c74b03223">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="aa30fc6ae311130ee5702ad4e0b3fc099"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa30fc6ae311130ee5702ad4e0b3fc099">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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>&#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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#aa001e2fca87d2aa303334fe730955249">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="a2e42d9d3d4d9f96285ba504d7668a34b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e42d9d3d4d9f96285ba504d7668a34b">&#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"><a class="el" href="classcrashpad_1_1Settings.html">Settings</a> * crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a705a5c510ba8eeda15bf4fe9af6e37b1">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="a17f445e44bd09f86b352fa5846e9ff35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17f445e44bd09f86b352fa5846e9ff35">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a19191932252bc836a84cf432ea8f3b7e">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="a0929c775c77975671805a06ed790afaf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0929c775c77975671805a06ed790afaf">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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_1CrashReportDatabaseMac.html#a21779f103f618f0fa97d8cbe6f5ea936" 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_1CrashReportDatabaseMac.html#a21779f103f618f0fa97d8cbe6f5ea936" 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 NewReport 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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a2e40ddf9bc49998c7cd30eb4035bb23f">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="a5c2c91bc0a68ba9cf9f09cad8268257f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c2c91bc0a68ba9cf9f09cad8268257f">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a4c195d0ba0155e3692be1bdb4bb79fc6">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<a id="a5a92b53f409c4d360403b00aa5aaa8fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a92b53f409c4d360403b00aa5aaa8fe">&#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"><a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a0bbd146654537fa0cf1b576eb647bb00">CrashReportDatabase::OperationStatus</a> crashpad::CrashReportDatabaseMac::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">override</span><span class="mlabel">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>Implements <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#ab0869a26352d37e7f99d9b520f6d07cd">crashpad::CrashReportDatabase</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>client/crash_report_database_mac.mm</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>