diff --git a/client/crash_report_database.h b/client/crash_report_database.h index db90886b..cb667dbe 100644 --- a/client/crash_report_database.h +++ b/client/crash_report_database.h @@ -137,8 +137,7 @@ class CrashReportDatabase { //! \brief Initializes a database of crash reports. //! - //! \param[in] path A path to a writable directory, where the database can - //! be created or opened. + //! \param[in] path A path to the database to be created or opened. //! //! \return A database object on success, `nullptr` on failure with an error //! logged. diff --git a/client/crash_report_database_mac.mm b/client/crash_report_database_mac.mm index 4e25f006..b849bb0f 100644 --- a/client/crash_report_database_mac.mm +++ b/client/crash_report_database_mac.mm @@ -40,8 +40,6 @@ namespace crashpad { namespace { -const char kDatabaseDirectoryName[] = "Crashpad"; - const char kWriteDirectory[] = "new"; const char kUploadPendingDirectory[] = "pending"; const char kCompletedDirectory[] = "completed"; @@ -597,7 +595,7 @@ std::string CrashReportDatabaseMac::XattrName(const base::StringPiece& name) { scoped_ptr CrashReportDatabase::Initialize( const base::FilePath& path) { scoped_ptr database_mac( - new CrashReportDatabaseMac(path.Append(kDatabaseDirectoryName))); + new CrashReportDatabaseMac(path)); if (!database_mac->Initialize()) database_mac.reset(); diff --git a/client/crash_report_database_test.cc b/client/crash_report_database_test.cc index 44fde917..3a714bd8 100644 --- a/client/crash_report_database_test.cc +++ b/client/crash_report_database_test.cc @@ -56,7 +56,9 @@ class CrashReportDatabaseTest : public testing::Test { } CrashReportDatabase* db() { return db_.get(); } - const base::FilePath& path() const { return temp_dir_.path(); } + base::FilePath path() const { + return temp_dir_.path().Append(FILE_PATH_LITERAL("crashpad_test_database")); + } void CreateCrashReport(CrashReportDatabase::Report* report) { CrashReportDatabase::NewReport* new_report = nullptr; diff --git a/client/crash_report_database_win.cc b/client/crash_report_database_win.cc index b7c97d6c..afa39338 100644 --- a/client/crash_report_database_win.cc +++ b/client/crash_report_database_win.cc @@ -30,8 +30,6 @@ namespace crashpad { namespace { -const wchar_t kDatabaseDirectoryName[] = L"Crashpad"; - const wchar_t kReportsDirectory[] = L"reports"; const wchar_t kMetadataFileName[] = L"metadata"; @@ -763,7 +761,7 @@ scoped_ptr CrashReportDatabaseWin::AcquireMetadata() { scoped_ptr CrashReportDatabase::Initialize( const base::FilePath& path) { scoped_ptr database_win( - new CrashReportDatabaseWin(path.Append(kDatabaseDirectoryName))); + new CrashReportDatabaseWin(path)); return database_win->Initialize() ? database_win.Pass() : scoped_ptr(); }