| Index: client/crash_report_database_mac.mm
|
| diff --git a/client/crash_report_database_mac.mm b/client/crash_report_database_mac.mm
|
| index eeb203eaef39d43330dcdde6ecbee2609a287ce0..247e5443ab8a7b5e91873fcdb73e04c9becaf8ad 100644
|
| --- a/client/crash_report_database_mac.mm
|
| +++ b/client/crash_report_database_mac.mm
|
| @@ -29,6 +29,7 @@
|
| #include "base/strings/string_piece.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| +#include "client/settings_mac.h"
|
| #include "util/file/file_io.h"
|
| #include "util/mac/xattr.h"
|
|
|
| @@ -42,6 +43,8 @@ const char kWriteDirectory[] = "new";
|
| const char kUploadPendingDirectory[] = "pending";
|
| const char kCompletedDirectory[] = "completed";
|
|
|
| +const char kSettings[] = "settings.plist";
|
| +
|
| const char* const kReportDirectories[] = {
|
| kWriteDirectory,
|
| kUploadPendingDirectory,
|
| @@ -106,6 +109,7 @@ class CrashReportDatabaseMac : public CrashReportDatabase {
|
| bool Initialize();
|
|
|
| // CrashReportDatabase:
|
| + Settings* GetSettings() override;
|
| OperationStatus PrepareNewCrashReport(NewReport** report) override;
|
| OperationStatus FinishedWritingCrashReport(NewReport* report,
|
| UUID* uuid) override;
|
| @@ -186,12 +190,15 @@ class CrashReportDatabaseMac : public CrashReportDatabase {
|
| static std::string XattrName(const base::StringPiece& name);
|
|
|
| base::FilePath base_dir_;
|
| + internal::SettingsMac settings_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseMac);
|
| };
|
|
|
| CrashReportDatabaseMac::CrashReportDatabaseMac(const base::FilePath& path)
|
| - : CrashReportDatabase(), base_dir_(path) {
|
| + : CrashReportDatabase(),
|
| + base_dir_(path),
|
| + settings_(base_dir_.Append(kSettings)) {
|
| }
|
|
|
| CrashReportDatabaseMac::~CrashReportDatabaseMac() {}
|
| @@ -207,11 +214,18 @@ bool CrashReportDatabaseMac::Initialize() {
|
| return false;
|
| }
|
|
|
| + if (!settings_.Initialize())
|
| + return false;
|
| +
|
| // Write an xattr as the last step, to ensure the filesystem has support for
|
| // them. This attribute will never be read.
|
| return WriteXattrBool(base_dir_, XattrName(kXattrDatabaseInitialized), true);
|
| }
|
|
|
| +Settings* CrashReportDatabaseMac::GetSettings() {
|
| + return &settings_;
|
| +}
|
| +
|
| CrashReportDatabase::OperationStatus
|
| CrashReportDatabaseMac::PrepareNewCrashReport(NewReport** out_report) {
|
| uuid_t uuid_gen;
|
|
|