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

Unified Diff: chrome/app/kasko_client.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 | « no previous file | chrome/app/main_dll_loader_win.cc » ('j') | components/crash/content/app/crashpad.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/kasko_client.cc
diff --git a/chrome/app/kasko_client.cc b/chrome/app/kasko_client.cc
index f9699e9073cc0ae3631eb3db4bf1d116b2e177e9..61d806934aa9a34047fab408919b87ce560d3366 100644
--- a/chrome/app/kasko_client.cc
+++ b/chrome/app/kasko_client.cc
@@ -11,13 +11,13 @@
#include <string>
#include <vector>
+#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/process/process_handle.h"
-#include "breakpad/src/client/windows/common/ipc_protocol.h"
#include "chrome/app/chrome_watcher_client_win.h"
#include "chrome/chrome_watcher/chrome_watcher_main_api.h"
#include "chrome/common/chrome_constants.h"
-#include "components/crash/content/app/crash_keys_win.h"
+#include "components/crash/content/app/crashpad.h"
#include "syzygy/kasko/api/client.h"
namespace {
@@ -25,30 +25,14 @@ namespace {
ChromeWatcherClient* g_chrome_watcher_client = nullptr;
kasko::api::MinidumpType g_minidump_type = kasko::api::SMALL_DUMP_TYPE;
+base::LazyInstance<std::vector<kasko::api::CrashKey>>::Leaky
+ g_kasko_crash_keys = LAZY_INSTANCE_INITIALIZER;
+
void GetKaskoCrashKeys(const kasko::api::CrashKey** crash_keys,
size_t* crash_key_count) {
- static_assert(
- sizeof(kasko::api::CrashKey) == sizeof(google_breakpad::CustomInfoEntry),
- "CrashKey and CustomInfoEntry structs are not compatible.");
- static_assert(offsetof(kasko::api::CrashKey, name) ==
- offsetof(google_breakpad::CustomInfoEntry, name),
- "CrashKey and CustomInfoEntry structs are not compatible.");
- static_assert(offsetof(kasko::api::CrashKey, value) ==
- offsetof(google_breakpad::CustomInfoEntry, value),
- "CrashKey and CustomInfoEntry structs are not compatible.");
- static_assert(
- sizeof(reinterpret_cast<kasko::api::CrashKey*>(0)->name) ==
- sizeof(reinterpret_cast<google_breakpad::CustomInfoEntry*>(0)->name),
- "CrashKey and CustomInfoEntry structs are not compatible.");
- static_assert(
- sizeof(reinterpret_cast<kasko::api::CrashKey*>(0)->value) ==
- sizeof(reinterpret_cast<google_breakpad::CustomInfoEntry*>(0)->value),
- "CrashKey and CustomInfoEntry structs are not compatible.");
-
- *crash_key_count =
- breakpad::CrashKeysWin::keeper()->custom_info_entries().size();
- *crash_keys = reinterpret_cast<const kasko::api::CrashKey*>(
- breakpad::CrashKeysWin::keeper()->custom_info_entries().data());
+ crash_reporter::GetCrashKeysForKasko(g_kasko_crash_keys.Pointer());
+ *crash_key_count = g_kasko_crash_keys.Pointer()->size();
+ *crash_keys = g_kasko_crash_keys.Pointer()->data();
}
} // namespace
« no previous file with comments | « no previous file | chrome/app/main_dll_loader_win.cc » ('j') | components/crash/content/app/crashpad.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698