Crashpad
|
An interface for accessing and modifying the settings of a CrashReportDatabase. More...
#include "client/settings.h"
Classes | |
struct | Data |
Public Member Functions | |
bool | Initialize (const base::FilePath &path) |
Initializes the settings data store. More... | |
bool | GetClientID (UUID *client_id) |
Retrieves the immutable identifier for this client, which is used on a server to locate all crash reports from a specific Crashpad database. More... | |
bool | GetUploadsEnabled (bool *enabled) |
Retrieves the user’s preference for submitting crash reports to a collection server. More... | |
bool | SetUploadsEnabled (bool enabled) |
Sets the user’s preference for submitting crash reports to a collection server. More... | |
bool | GetLastUploadAttemptTime (time_t *time) |
Retrieves the last time at which a report was attempted to be uploaded. More... | |
bool | SetLastUploadAttemptTime (time_t time) |
Sets the last time at which a report was attempted to be uploaded. More... | |
An interface for accessing and modifying the settings of a CrashReportDatabase.
This class must not be instantiated directly, but rather an instance of it should be retrieved via CrashReportDatabase::GetSettings().
bool crashpad::Settings::GetClientID | ( | UUID * | client_id | ) |
Retrieves the immutable identifier for this client, which is used on a server to locate all crash reports from a specific Crashpad database.
This is automatically initialized when the database is created.
[out] | client_id | The unique client identifier. |
true
, otherwise returns false
with an error logged. bool crashpad::Settings::GetLastUploadAttemptTime | ( | time_t * | time | ) |
Retrieves the last time at which a report was attempted to be uploaded.
The default value is 0
if it has never been set before.
[out] | time | The last time at which a report was uploaded. |
true
, otherwise returns false
with an error logged. bool crashpad::Settings::GetUploadsEnabled | ( | bool * | enabled | ) |
Retrieves the user’s preference for submitting crash reports to a collection server.
The default value is false
.
[out] | enabled | Whether crash reports should be uploaded. |
true
, otherwise returns false
with an error logged. bool crashpad::Settings::Initialize | ( | const base::FilePath & | path | ) |
Initializes the settings data store.
This method must be called only once, and must be successfully called before any other method in this class may be called.
[in] | path | The location to store the settings data. |
true
if the data store was initialized successfully, otherwise false
with an error logged. bool crashpad::Settings::SetLastUploadAttemptTime | ( | time_t | time | ) |
Sets the last time at which a report was attempted to be uploaded.
This is only meant to be used internally by the CrashReportDatabase.
[in] | time | The last time at which a report was uploaded. |
true
, otherwise returns false
with an error logged. bool crashpad::Settings::SetUploadsEnabled | ( | bool | enabled | ) |
Sets the user’s preference for submitting crash reports to a collection server.
[in] | enabled | Whether crash reports should be uploaded. |
true
, otherwise returns false
with an error logged.