<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::Settings 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.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</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_1Settings.html">Settings</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_1Settings-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">crashpad::Settings Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>An interface for accessing and modifying the settings of 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>.  
 <a href="classcrashpad_1_1Settings.html#details">More...</a></p>

<p><code>#include &quot;client/settings.h&quot;</code></p>
<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">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcrashpad_1_1Settings_1_1Data.html">Data</a></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-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a650c49970614e6de1bf5cab607279a40"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Settings.html#a650c49970614e6de1bf5cab607279a40">Initialize</a> (const base::FilePath &amp;path)</td></tr>
<tr class="memdesc:a650c49970614e6de1bf5cab607279a40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the settings data store.  <a href="#a650c49970614e6de1bf5cab607279a40">More...</a><br /></td></tr>
<tr class="separator:a650c49970614e6de1bf5cab607279a40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5daa0f1799126f64ad515b9da08ef622"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Settings.html#a5daa0f1799126f64ad515b9da08ef622">GetClientID</a> (<a class="el" href="structcrashpad_1_1UUID.html">UUID</a> *client_id)</td></tr>
<tr class="memdesc:a5daa0f1799126f64ad515b9da08ef622"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the immutable identifier for this client, which is used on a server to locate all crash reports from a specific Crashpad database.  <a href="#a5daa0f1799126f64ad515b9da08ef622">More...</a><br /></td></tr>
<tr class="separator:a5daa0f1799126f64ad515b9da08ef622"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49198982b5d7f82fa3096b34cda70015"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Settings.html#a49198982b5d7f82fa3096b34cda70015">GetUploadsEnabled</a> (bool *enabled)</td></tr>
<tr class="memdesc:a49198982b5d7f82fa3096b34cda70015"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the user’s preference for submitting crash reports to a collection server.  <a href="#a49198982b5d7f82fa3096b34cda70015">More...</a><br /></td></tr>
<tr class="separator:a49198982b5d7f82fa3096b34cda70015"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1af15625bc137e0a67f6f9fcf016382b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Settings.html#a1af15625bc137e0a67f6f9fcf016382b">SetUploadsEnabled</a> (bool enabled)</td></tr>
<tr class="memdesc:a1af15625bc137e0a67f6f9fcf016382b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the user’s preference for submitting crash reports to a collection server.  <a href="#a1af15625bc137e0a67f6f9fcf016382b">More...</a><br /></td></tr>
<tr class="separator:a1af15625bc137e0a67f6f9fcf016382b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a855f61d6fc73042dcb886ef40d8e4429"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Settings.html#a855f61d6fc73042dcb886ef40d8e4429">GetLastUploadAttemptTime</a> (time_t *time)</td></tr>
<tr class="memdesc:a855f61d6fc73042dcb886ef40d8e4429"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the last time at which a report was attempted to be uploaded.  <a href="#a855f61d6fc73042dcb886ef40d8e4429">More...</a><br /></td></tr>
<tr class="separator:a855f61d6fc73042dcb886ef40d8e4429"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a396d4fcd0adda6fcaf8b15a94f0c24ac"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Settings.html#a396d4fcd0adda6fcaf8b15a94f0c24ac">SetLastUploadAttemptTime</a> (time_t time)</td></tr>
<tr class="memdesc:a396d4fcd0adda6fcaf8b15a94f0c24ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the last time at which a report was attempted to be uploaded.  <a href="#a396d4fcd0adda6fcaf8b15a94f0c24ac">More...</a><br /></td></tr>
<tr class="separator:a396d4fcd0adda6fcaf8b15a94f0c24ac"><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 accessing and modifying the settings of 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>. </p>
<p>This class must not be instantiated directly, but rather an instance of it should be retrieved via <a class="el" href="classcrashpad_1_1CrashReportDatabase.html#a705a5c510ba8eeda15bf4fe9af6e37b1" title="Returns the Settings object for this database. ">CrashReportDatabase::GetSettings()</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a5daa0f1799126f64ad515b9da08ef622"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5daa0f1799126f64ad515b9da08ef622">&#9670;&nbsp;</a></span>GetClientID()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool crashpad::Settings::GetClientID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcrashpad_1_1UUID.html">UUID</a> *&#160;</td>
          <td class="paramname"><em>client_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the immutable identifier for this client, which is used on a server to locate all crash reports from a specific Crashpad database. </p>
<p>This is automatically initialized when the database is created.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">client_id</td><td>The unique client identifier.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>On success, returns <code>true</code>, otherwise returns <code>false</code> with an error logged. </dd></dl>

</div>
</div>
<a id="a855f61d6fc73042dcb886ef40d8e4429"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a855f61d6fc73042dcb886ef40d8e4429">&#9670;&nbsp;</a></span>GetLastUploadAttemptTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool crashpad::Settings::GetLastUploadAttemptTime </td>
          <td>(</td>
          <td class="paramtype">time_t *&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the last time at which a report was attempted to be uploaded. </p>
<p>The default value is <code>0</code> if it has never been set before.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">time</td><td>The last time at which a report was uploaded.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>On success, returns <code>true</code>, otherwise returns <code>false</code> with an error logged. </dd></dl>

</div>
</div>
<a id="a49198982b5d7f82fa3096b34cda70015"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49198982b5d7f82fa3096b34cda70015">&#9670;&nbsp;</a></span>GetUploadsEnabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool crashpad::Settings::GetUploadsEnabled </td>
          <td>(</td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>enabled</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the user’s preference for submitting crash reports to a collection server. </p>
<p>The default value is <code>false</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">enabled</td><td>Whether crash reports should be uploaded.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>On success, returns <code>true</code>, otherwise returns <code>false</code> with an error logged. </dd></dl>

</div>
</div>
<a id="a650c49970614e6de1bf5cab607279a40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a650c49970614e6de1bf5cab607279a40">&#9670;&nbsp;</a></span>Initialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool crashpad::Settings::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>
</div><div class="memdoc">

<p>Initializes the settings data store. </p>
<p>This method must be called only once, and must be successfully called before any other method in this class may be called.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>The location to store the settings data. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the data store was initialized successfully, otherwise <code>false</code> with an error logged. </dd></dl>

</div>
</div>
<a id="a396d4fcd0adda6fcaf8b15a94f0c24ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a396d4fcd0adda6fcaf8b15a94f0c24ac">&#9670;&nbsp;</a></span>SetLastUploadAttemptTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool crashpad::Settings::SetLastUploadAttemptTime </td>
          <td>(</td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the last time at which a report was attempted to be uploaded. </p>
<p>This is only meant to be used internally by the <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>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>The last time at which a report was uploaded.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>On success, returns <code>true</code>, otherwise returns <code>false</code> with an error logged. </dd></dl>

</div>
</div>
<a id="a1af15625bc137e0a67f6f9fcf016382b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1af15625bc137e0a67f6f9fcf016382b">&#9670;&nbsp;</a></span>SetUploadsEnabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool crashpad::Settings::SetUploadsEnabled </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the user’s preference for submitting crash reports to a collection server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">enabled</td><td>Whether crash reports should be uploaded.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>On success, returns <code>true</code>, otherwise returns <code>false</code> with an error logged. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>client/settings.h</li>
<li>client/settings.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.13
</small></address>
</body>
</html>