Commit 6df9a310 authored by Olga Sharonova's avatar Olga Sharonova Committed by Commit Bot

Adding service name as utility process crash key

(Could not use crash_reporter due to deps restrictions)

Bug: 866830
Change-Id: Ia3cc17720d0d375c4a8536412df2cafb426167b1
Reviewed-on: https://chromium-review.googlesource.com/c/1355099
Commit-Queue: Olga Sharonova <olka@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612424}
parent 6f1679e3
......@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "base/trace_event/trace_log.h"
#include "build/build_config.h"
......@@ -127,6 +128,11 @@ void UtilityServiceFactory::CreateService(
auto* trace_log = base::trace_event::TraceLog::GetInstance();
if (trace_log->IsProcessNameEmpty())
trace_log->set_process_name("Service: " + name);
static auto* service_name = base::debug::AllocateCrashKeyString(
"service-name", base::debug::CrashKeySize::Size32);
base::debug::SetCrashKeyString(service_name, name);
ServiceFactory::CreateService(std::move(request), name,
std::move(pid_receiver));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment