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

Unified Diff: chrome/app/kasko_client.cc

Issue 981183003: Revert "ScopedCrashKey doesn't appear to be configured to work on Windows. Manually set the crash k… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_crash_logging
Patch Set: Created 5 years, 9 months 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 | no next file » | no next file with comments »
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 3bdf5d0c13814034f6bb2bf356b608dac78bfba8..7e74c00706d27e40f6a8eb16ecd00f20f6f4d4ed 100644
--- a/chrome/app/kasko_client.cc
+++ b/chrome/app/kasko_client.cc
@@ -10,10 +10,10 @@
#include <string>
+#include "base/debug/crash_logging.h"
#include "base/guid.h"
#include "base/logging.h"
#include "base/process/process_handle.h"
-#include "base/strings/utf_string_conversions.h"
#include "base/win/wrapped_window_proc.h"
#include "breakpad/src/client/windows/common/ipc_protocol.h"
#include "chrome/app/chrome_watcher_client_win.h"
@@ -61,45 +61,33 @@ extern "C" void __declspec(dllexport) ReportCrashWithProtobuf(
sizeof(reinterpret_cast<google_breakpad::CustomInfoEntry*>(0)->value),
"CrashKey and CustomInfoEntry structs are not compatible.");
- breakpad::CrashKeysWin* keeper = breakpad::CrashKeysWin::keeper();
- if (!keeper)
- return;
-
// Assign a GUID that can be used to correlate the Kasko report to the
// Breakpad report, to verify data consistency.
std::string guid = base::GenerateGUID();
{
- keeper->SetCrashKeyValue(base::ASCIIToUTF16(crash_keys::kKaskoGuid).c_str(),
- base::ASCIIToUTF16(guid).c_str());
-
base::debug::ScopedCrashKey kasko_guid(crash_keys::kKaskoGuid, guid);
- size_t crash_key_count = keeper->custom_info_entries().size();
+ size_t crash_key_count =
+ breakpad::CrashKeysWin::keeper()->custom_info_entries().size();
const kasko::api::CrashKey* crash_keys =
reinterpret_cast<const kasko::api::CrashKey*>(
- keeper->custom_info_entries().data());
+ breakpad::CrashKeysWin::keeper()->custom_info_entries().data());
if (g_chrome_watcher_client &&
g_chrome_watcher_client->EnsureInitialized()) {
kasko::api::SendReport(info, protobuf, protobuf_length, crash_keys,
crash_key_count);
}
-
- keeper->ClearCrashKeyValue(
- base::ASCIIToUTF16(crash_keys::kKaskoGuid).c_str());
}
{
- keeper->SetCrashKeyValue(
- base::ASCIIToUTF16(crash_keys::kKaskoEquivalentGuid).c_str(),
- base::ASCIIToUTF16(guid).c_str());
+ base::debug::ScopedCrashKey kasko_equivalent_guid(
+ crash_keys::kKaskoEquivalentGuid, guid);
// While Kasko remains experimental, also report via Breakpad.
base::win::WinProcExceptionFilter crash_for_exception =
reinterpret_cast<base::win::WinProcExceptionFilter>(::GetProcAddress(
::GetModuleHandle(chrome::kBrowserProcessExecutableName),
"CrashForException"));
crash_for_exception(info);
- keeper->ClearCrashKeyValue(
- base::ASCIIToUTF16(crash_keys::kKaskoEquivalentGuid).c_str());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698