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

Unified Diff: components/crash/content/app/crashpad.cc

Issue 1512463003: win: Get Kasko crash keys from Crashpad instead of Breakpad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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 | « components/crash/content/app/crashpad.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « components/crash/content/app/crashpad.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698