OLD | NEW |
---|---|
(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 "chromecast/crash/cast_crash_keys.h" | |
6 | |
7 namespace chromecast { | |
8 namespace crash_keys { | |
9 | |
10 // TODO(kjoswiak): Potentially refactor chunk size info as well as non-cast | |
11 // specific keys out and make shared with chrome/common/crash_keys.cc | |
12 | |
13 // A small crash key, guaranteed to never be split into multiple pieces. | |
14 const size_t kSmallSize = 63; | |
15 | |
16 // A medium crash key, which will be chunked on certain platforms but not | |
17 // others. Guaranteed to never be more than four chunks. | |
18 const size_t kMediumSize = kSmallSize * 4; | |
19 | |
20 // A large crash key, which will be chunked on all platforms. This should be | |
21 // used sparingly. | |
22 const size_t kLargeSize = kSmallSize * 16; | |
23 | |
24 // The maximum lengths specified by breakpad include the trailing NULL, so | |
25 // the actual length of the string is one less. | |
26 static const size_t kSingleChunkLength = 63; | |
byungchul
2015/02/18 19:09:03
Please define them in an anonymous namespace.
kjoswiak
2015/02/18 19:46:51
Done.
| |
27 | |
28 const char kLastApp[] = "last_app"; | |
29 const char kCurrentApp[] = "current_app"; | |
30 const char kPreviousApp[] = "previous_app"; | |
31 | |
32 size_t RegisterCastCrashKeys() { | |
33 const base::debug::CrashKey fixed_keys[] = { | |
34 { kLastApp, kSmallSize }, | |
35 { kCurrentApp, kSmallSize }, | |
36 { kPreviousApp, kSmallSize }, | |
37 // base/: | |
38 { "dm-usage", kSmallSize }, | |
39 { "total-dm-usage", kSmallSize }, | |
40 // content/: | |
41 { "ppapi_path", kMediumSize }, | |
42 { "subresource_url", kLargeSize }, | |
43 }; | |
44 | |
45 return base::debug::InitCrashKeys(fixed_keys, arraysize(fixed_keys), | |
46 kSingleChunkLength); | |
47 } | |
48 | |
49 } // namespace chromecast | |
50 } // namespace crash_keys | |
OLD | NEW |