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

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: 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') | handler/main.cc » ('J')
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 baf95adcd335fce906b4c5b0f312210c561a11ed..4642c322becd1a519999ab6bab1ada662dc6be5d 100644
--- a/client/crash_report_database.h
+++ b/client/crash_report_database.h
@@ -168,10 +168,17 @@ class CrashReportDatabase {
//! \brief Initializes a database of crash reports.
//!
//! \param[in] path A path to the database to be created or opened.
+ //! \param[in] create If `true`, a database that does not yet exist will be
+ //! created if possible. If `false`, the database must already exist. Note
+ //! that for databases implemented as directory structures, existence
+ //! refers solely to the outermost directory, and that if the outermost
+ //! directory exists, any inner structure will be created even if \a
+ //! create is `false`.
//!
//! \return A database object on success, `nullptr` on failure with an error
//! logged.
- static scoped_ptr<CrashReportDatabase> Initialize(const base::FilePath& path);
+ static scoped_ptr<CrashReportDatabase> Initialize(const base::FilePath& path,
+ bool create);
Mark Mentovai 2015/10/07 18:45:58 This interface is the one thing I’m not sure about
scottmg 2015/10/07 19:16:30 I agree, I think a separate interface method for n
//! \brief Returns the Settings object for this database.
//!
« no previous file with comments | « no previous file | client/crash_report_database_mac.mm » ('j') | handler/main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698