#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/common/crash_keys.h"
#include <deque>
#include <string_view>
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/no_destructor.h"
#include "base/strings/strcat.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/common/chrome_switches.h"
#include "components/crash/core/common/crash_key.h"
#include "components/crash/core/common/crash_keys.h"
#include "components/flags_ui/flags_ui_switches.h"
#include "content/public/common/content_switches.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "components/crash/core/app/crash_switches.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "ui/gl/gl_switches.h"
#endif
namespace crash_keys {
namespace {
constexpr std::string_view kStringAnnotationsSwitch = …;
class CrashKeyWithName { … };
void SplitAndPopulateCrashKeys(std::deque<CrashKeyWithName>& crash_keys,
std::string_view comma_separated_feature_list,
std::string crash_key_name_prefix) { … }
void HandleEnableDisableFeatures(const base::CommandLine& command_line) { … }
bool IsBoringSwitch(const std::string& flag) { … }
std::deque<CrashKeyWithName>& GetCommandLineStringAnnotations() { … }
void SetStringAnnotations(const base::CommandLine& command_line) { … }
}
void AllocateCrashKeyInBrowserAndChildren(std::string_view key,
std::string_view value) { … }
void AppendStringAnnotationsCommandLineSwitch(base::CommandLine* command_line) { … }
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { … }
}