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

Side by Side Diff: chromecast/crash/cast_crash_keys.cc

Issue 923263004: Enable crash keys for cast shell on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed namespace Created 5 years, 10 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
« no previous file with comments | « chromecast/crash/cast_crash_keys.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromecast/crash/cast_crash_keys.h"
6
7 // TODO(kjoswiak): Potentially refactor chunk size info as well as non-cast
8 // specific keys out and make shared with chrome/common/crash_keys.cc.
9 namespace {
10
11 // A small crash key, guaranteed to never be split into multiple pieces.
12 const size_t kSmallSize = 63;
13
14 // A medium crash key, which will be chunked on certain platforms but not
15 // others. Guaranteed to never be more than four chunks.
16 const size_t kMediumSize = kSmallSize * 4;
17
18 // A large crash key, which will be chunked on all platforms. This should be
19 // used sparingly.
20 const size_t kLargeSize = kSmallSize * 16;
21
22 // The maximum lengths specified by breakpad include the trailing NULL, so
23 // the actual length of the string is one less.
24 static const size_t kSingleChunkLength = 63;
25
26 }
27
28 namespace chromecast {
29 namespace crash_keys {
30
31 const char kLastApp[] = "last_app";
32 const char kCurrentApp[] = "current_app";
33 const char kPreviousApp[] = "previous_app";
34
35 size_t RegisterCastCrashKeys() {
36 const base::debug::CrashKey fixed_keys[] = {
37 { kLastApp, kSmallSize },
38 { kCurrentApp, kSmallSize },
39 { kPreviousApp, kSmallSize },
40 // base/:
41 { "dm-usage", kSmallSize },
42 { "total-dm-usage", kSmallSize },
43 // content/:
44 { "ppapi_path", kMediumSize },
45 { "subresource_url", kLargeSize },
46 };
47
48 return base::debug::InitCrashKeys(fixed_keys, arraysize(fixed_keys),
49 kSingleChunkLength);
50 }
51
52 } // namespace chromecast
53 } // namespace crash_keys
OLDNEW
« no previous file with comments | « chromecast/crash/cast_crash_keys.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698