chromium/components/crash/core/common/crash_keys.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/crash/core/common/crash_keys.h"

#include <deque>
#include <string_view>
#include <vector>

#include "base/check_op.h"
#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/no_destructor.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/crash/core/common/crash_buildflags.h"
#include "components/crash/core/common/crash_key.h"

namespace crash_keys {

namespace {

#if !BUILDFLAG(USE_CRASHPAD_ANNOTATION)
// When using Crashpad, the crash reporting client ID is the responsibility of
// Crashpad. It is not set directly by Chrome. When using Breakpad instead of
// Crashpad, the crash reporting client ID is the same as the metrics client ID.
const char kMetricsClientId[] = "guid";

crash_reporter::CrashKeyString<40> client_id_key(kMetricsClientId);
#endif

}  // namespace

void SetMetricsClientIdFromGUID(const std::string& metrics_client_guid) {}

void ClearMetricsClientId() {}

SwitchesCrashKeys;
SwitchesCrashKeys& GetSwitchesCrashKeys() {}

static crash_reporter::CrashKeyString<4> num_switches_key("num-switches");

void SetSwitchesFromCommandLine(const base::CommandLine& command_line,
                                SwitchFilterFunction skip_filter) {}

void ResetCommandLineForTesting() {}

PrinterInfoKey;
static PrinterInfoKey printer_info_keys[] =;

ScopedPrinterInfo::ScopedPrinterInfo(const std::string& printer_name,
                                     std::vector<std::string> data) {}

ScopedPrinterInfo::~ScopedPrinterInfo() {}

}  // namespace crash_keys