complete GetParameters method & all tests passing
This commit is contained in:
parent
3136f833a5
commit
a538e47994
3 changed files with 26 additions and 14 deletions
|
@ -5,6 +5,7 @@
|
|||
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_MAC_H_
|
||||
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_MAC_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -37,6 +38,7 @@ class CrashReporterMac : public CrashReporter {
|
|||
void SetExtraParameter(const std::string& key,
|
||||
const std::string& value) override;
|
||||
void RemoveExtraParameter(const std::string& key) override;
|
||||
std::map<std::string, std::string> GetParameters() override;
|
||||
|
||||
private:
|
||||
friend struct base::DefaultSingletonTraits<CrashReporterMac>;
|
||||
|
|
|
@ -121,6 +121,21 @@ void CrashReporterMac::RemoveExtraParameter(const std::string& key) {
|
|||
upload_parameters_.erase(key);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> CrashReporterMac::GetParameters() {
|
||||
if (simple_string_dictionary_) {
|
||||
std::map<std::string, std::string> ret;
|
||||
crashpad::SimpleStringDictionary::Iterator iter(*simple_string_dictionary_);
|
||||
for(;;) {
|
||||
const crashpad::SimpleStringDictionary::Entry* entry = iter.Next();
|
||||
if (!entry) break;
|
||||
ret[entry->key] = entry->value;
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
return upload_parameters_;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CrashReporter::UploadReportResult>
|
||||
CrashReporterMac::GetUploadedReports(const base::FilePath& crashes_dir) {
|
||||
std::vector<CrashReporter::UploadReportResult> uploaded_reports;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue