summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/crash_report/crash_keys.cc
blob: 4d2e9ef3df7a54f1115373ff4fb7b3e192384415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ios/chrome/browser/crash_report/crash_keys.h"

#include <stddef.h>

#include "base/debug/crash_logging.h"
#include "base/macros.h"
#include "components/crash/core/common/crash_keys.h"

size_t RegisterChromeIOSCrashKeys() {
  // The following keys may be chunked by the underlying crash logging system,
  // but ultimately constitute a single key-value pair.
  base::debug::CrashKey fixed_keys[] = {
      {crash_keys::kBug464926CrashKey, crash_keys::kSmallSize},
      {crash_keys::kChannel, crash_keys::kSmallSize},
      {crash_keys::kMetricsClientId, crash_keys::kSmallSize},
      {crash_keys::kNumVariations, crash_keys::kSmallSize},
      {crash_keys::kVariations, crash_keys::kLargeSize},
      {crash_keys::mac::kZombie, crash_keys::kMediumSize},
      {crash_keys::mac::kZombieTrace, crash_keys::kMediumSize},
  };

  return base::debug::InitCrashKeys(fixed_keys, arraysize(fixed_keys),
                                    crash_keys::kChunkMaxLength);
}