Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: client/crash_report_database.h

Issue 1395653002: crashpad_database_util: Don’t create a database unless explicitly asked (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: For checkin Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/crash_report_database_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/crash_report_database.h
diff --git a/client/crash_report_database.h b/client/crash_report_database.h
index 1073d053debd02d988288e1efecf25c193594771..1897d2ec4691586821cde113d9cff58478d551a3 100644
--- a/client/crash_report_database.h
+++ b/client/crash_report_database.h
@@ -165,14 +165,34 @@ class CrashReportDatabase {
virtual ~CrashReportDatabase() {}
- //! \brief Initializes a database of crash reports.
+ //! \brief Opens a database of crash reports, possibly creating it.
//!
- //! \param[in] path A path to the database to be created or opened.
+ //! \param[in] path 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.
//!
//! \return A database object on success, `nullptr` on failure with an error
//! logged.
+ //!
+ //! \sa InitializeWithoutCreating
static scoped_ptr<CrashReportDatabase> Initialize(const base::FilePath& path);
+ //! \brief Opens an existing database of crash reports.
+ //!
+ //! \param[in] path 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.
+ //!
+ //! \return A database object on success, `nullptr` on failure with an error
+ //! logged.
+ //!
+ //! \sa Initialize
+ static scoped_ptr<CrashReportDatabase> InitializeWithoutCreating(
+ const base::FilePath& path);
+
//! \brief Returns the Settings object for this database.
//!
//! \return A weak pointer to the Settings object, which is owned by the
« no previous file with comments | « no previous file | client/crash_report_database_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698