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

Side by Side Diff: ios/chrome/browser/crash_report/crash_keys.cc

Issue 1298743002: Partially componentize chrome/common/crash_keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ios/chrome/browser/crash_report/crash_keys.h"
6
7 #include "base/debug/crash_logging.h"
8 #include "base/macros.h"
9 #include "breakpad/src/common/simple_string_dictionary.h"
10 #include "components/crash_keys/crash_keys.h"
11
12 namespace {
13
14 // The maximum lengths specified by breakpad include the trailing NULL, so
15 // the actual length of the string is one less.
16 static const size_t kSingleChunkLength =
17 google_breakpad::SimpleStringDictionary::value_size - 1;
18 }
19
20 size_t RegisterChromeIOSCrashKeys() {
21 // The following keys may be chunked by the underlying crash logging system,
22 // but ultimately constitute a single key-value pair.
23 base::debug::CrashKey fixed_keys[] = {
24 {crash_keys::kMetricsClientId, crash_keys::kSmallSize},
25 {crash_keys::kChannel, crash_keys::kSmallSize},
26 {crash_keys::kNumVariations, crash_keys::kSmallSize},
27 {crash_keys::kVariations, crash_keys::kLargeSize},
28 {crash_keys::mac::kZombie, crash_keys::kMediumSize},
29 {crash_keys::mac::kZombieTrace, crash_keys::kMediumSize},
30 };
31
32 return base::debug::InitCrashKeys(fixed_keys, arraysize(fixed_keys),
33 kSingleChunkLength);
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698