Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
BreakpadConfigurer Class Referencefinal

This class is used to configure Breakpad's handler before start. More...

#include <BreakpadConfigurer.h>

Collaboration diagram for BreakpadConfigurer:
[legend]

Public Member Functions

BreakpadConfigurerSetDatabasePathUTF8 (const std::string &pathUTF8)
 Sets the directory where crashreports will be stored (should have rw permission) More...
 
BreakpadConfigurerSetReportURL (const std::string &reportURL)
 Sets report URL to the crash reporting server (URL-Encoded, optional) More...
 
BreakpadConfigurerSetParameters (const std::map< std::string, std::string > &parameters)
 Sets an additional parameters that should be sent to a crash reporting server (ASCII encoded) More...
 
BreakpadConfigurerSetSenderPathUTF8 (const std::string &pathUTF8)
 Sets a path to a directory where crash reporter sending program is located. More...
 
void Start ()
 Starts the handler. More...
 

Private Attributes

std::string mDatabasePathUTF8
 
std::string mSenderPathUTF8
 
std::string mReportURL
 
std::map< std::string, std::string > mParameters
 

Detailed Description

This class is used to configure Breakpad's handler before start.


Audacity: A Digital Audio Editor

BreakpadConfigurer.h

Vitaly Sverchinsky

Typically handler should be started as early as possible. BreakpadConfigurer may be a short living object, it is used to configure Breakpad handler, and run it with BreakpadConfigurer::Start() method, It's expected that Start() will be called once during application lifetime, any calls to Set* methods after handler is started will be ignored. The handler itself simply starts crash sender program, passing all the details (path crash dump, report url, parameters...) as a command-line arguments to it. Please read official documentation for details: https://chromium.googlesource.com/breakpad/breakpad

Definition at line 27 of file BreakpadConfigurer.h.

Member Function Documentation

◆ SetDatabasePathUTF8()

BreakpadConfigurer & BreakpadConfigurer::SetDatabasePathUTF8 ( const std::string &  pathUTF8)

Sets the directory where crashreports will be stored (should have rw permission)


Audacity: A Digital Audio Editor

BreakpadConfigurer.cpp

Vitaly Sverchinsky

Definition at line 19 of file BreakpadConfigurer.cpp.

20{
21 mDatabasePathUTF8 = pathUTF8;
22 return *this;
23}
std::string mDatabasePathUTF8

References mDatabasePathUTF8.

Referenced by anonymous_namespace{AudacityApp.cpp}::InitCrashreports().

Here is the caller graph for this function:

◆ SetParameters()

BreakpadConfigurer & BreakpadConfigurer::SetParameters ( const std::map< std::string, std::string > &  parameters)

Sets an additional parameters that should be sent to a crash reporting server (ASCII encoded)

Definition at line 31 of file BreakpadConfigurer.cpp.

32{
33 mParameters = parameters;
34 return *this;
35}
std::map< std::string, std::string > mParameters

References mParameters.

Referenced by anonymous_namespace{AudacityApp.cpp}::InitCrashreports().

Here is the caller graph for this function:

◆ SetReportURL()

BreakpadConfigurer & BreakpadConfigurer::SetReportURL ( const std::string &  reportURL)

Sets report URL to the crash reporting server (URL-Encoded, optional)

Definition at line 25 of file BreakpadConfigurer.cpp.

26{
27 mReportURL = reportURL;
28 return *this;
29}

References mReportURL.

Referenced by anonymous_namespace{AudacityApp.cpp}::InitCrashreports().

Here is the caller graph for this function:

◆ SetSenderPathUTF8()

BreakpadConfigurer & BreakpadConfigurer::SetSenderPathUTF8 ( const std::string &  pathUTF8)

Sets a path to a directory where crash reporter sending program is located.

Definition at line 37 of file BreakpadConfigurer.cpp.

38{
39 mSenderPathUTF8 = pathUTF8;
40 return *this;
41}
std::string mSenderPathUTF8

References mSenderPathUTF8.

Referenced by anonymous_namespace{AudacityApp.cpp}::InitCrashreports().

Here is the caller graph for this function:

◆ Start()

void BreakpadConfigurer::Start ( )

Starts the handler.

Definition at line 43 of file BreakpadConfigurer.cpp.

44{
45 static CrashReportContext context{};
46 bool ok = context.SetSenderPathUTF8(mSenderPathUTF8);
47 ok = ok && context.SetReportURL(mReportURL);
48 ok = ok && context.SetParameters(mParameters);
49 if (ok)
50 context.StartHandler(mDatabasePathUTF8);
51}
This object is for internal usage.
bool SetSenderPathUTF8(const std::string &path)

References mDatabasePathUTF8, mParameters, mReportURL, mSenderPathUTF8, and CrashReportContext::SetSenderPathUTF8().

Here is the call graph for this function:

Member Data Documentation

◆ mDatabasePathUTF8

std::string BreakpadConfigurer::mDatabasePathUTF8
private

Definition at line 29 of file BreakpadConfigurer.h.

Referenced by SetDatabasePathUTF8(), and Start().

◆ mParameters

std::map<std::string, std::string> BreakpadConfigurer::mParameters
private

Definition at line 32 of file BreakpadConfigurer.h.

Referenced by SetParameters(), and Start().

◆ mReportURL

std::string BreakpadConfigurer::mReportURL
private

Definition at line 31 of file BreakpadConfigurer.h.

Referenced by SetReportURL(), and Start().

◆ mSenderPathUTF8

std::string BreakpadConfigurer::mSenderPathUTF8
private

Definition at line 30 of file BreakpadConfigurer.h.

Referenced by SetSenderPathUTF8(), and Start().


The documentation for this class was generated from the following files: