Chromium Code Reviews| Index: components/crash/content/app/crashpad.cc |
| diff --git a/components/crash/content/app/crashpad.cc b/components/crash/content/app/crashpad.cc |
| index 345dced18decc078b70e0c57b2cc454b619bac18..152576491dada85ade002ec0bbf1bdfacee4646a 100644 |
| --- a/components/crash/content/app/crashpad.cc |
| +++ b/components/crash/content/app/crashpad.cc |
| @@ -241,6 +241,25 @@ void GetUploadedReports(std::vector<UploadedReport>* uploaded_reports) { |
| }); |
| } |
| +#if defined(KASKO) |
| + |
| +void GetCrashKeysForKasko(std::vector<kasko::api::CrashKey>* crash_keys) { |
| + crash_keys->clear(); |
| + crash_keys->reserve(g_simple_string_dictionary->GetCount()); |
| + crashpad::SimpleStringDictionary::Iterator iter(*g_simple_string_dictionary); |
| + for (;;) { |
|
Mark Mentovai
2015/12/15 18:19:34
I like
while ((entry = iter.Next()) != nullptr)
scottmg
2015/12/15 18:37:12
My main reason is that I feel like there'll be a c
grt (UTC plus 2)
2015/12/15 20:12:36
?
for (const auto* entry = iter.Next(); entry; e
scottmg
2015/12/15 20:20:01
But then there's unnecessary duplication of "iter.
|
| + const auto* entry = iter.Next(); |
| + if (!entry) |
| + break; |
| + kasko::api::CrashKey kv; |
| + wcsncpy_s(kv.name, base::UTF8ToWide(entry->key).c_str(), _TRUNCATE); |
| + wcsncpy_s(kv.value, base::UTF8ToWide(entry->value).c_str(), _TRUNCATE); |
| + crash_keys->push_back(kv); |
| + } |
| +} |
| + |
| +#endif // KASKO |
| + |
| } // namespace crash_reporter |
| #if defined(OS_WIN) |