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

Side by Side Diff: components/crash_keys/crash_keys.h

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 #ifndef COMPONENTS_CRASH_KEYS_CRASH_KEYS_H_
6 #define COMPONENTS_CRASH_KEYS_CRASH_KEYS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "build/build_config.h"
12
13 namespace crash_keys {
14
15 // Sets the ID (which may either be a full GUID or a GUID that was already
16 // stripped from its dashes -- in either case this method will strip remaining
17 // dashes before setting the crash key).
18 void SetMetricsClientIdFromGUID(const std::string& metrics_client_guid);
19 void ClearMetricsClientId();
20
21 // Sets the list of active experiment/variations info.
22 void SetVariationsList(const std::vector<std::string>& variations);
23
24 // Crash Key Constants /////////////////////////////////////////////////////////
25
26 // A small crash key, guaranteed to never be split into multiple pieces.
27 const size_t kSmallSize = 63;
28
29 // A medium crash key, which will be chunked on certain platforms but not
30 // others. Guaranteed to never be more than four chunks.
31 const size_t kMediumSize = kSmallSize * 4;
32
33 // A large crash key, which will be chunked on all platforms. This should be
34 // used sparingly.
35 const size_t kLargeSize = kSmallSize * 16;
36
37 // Crash Key Name Constants ////////////////////////////////////////////////////
38
39 // The GUID used to identify this client to the crash system.
40 #if defined(OS_MACOSX)
41 // On Mac OS X, the crash reporting client ID is the responsibility of Crashpad.
42 // It is not set directly by Chrome. To make the metrics client ID available on
43 // the server, it's stored in a distinct key.
44 extern const char kMetricsClientId[];
45 #else
46 // When using Breakpad instead of Crashpad, the crash reporting client ID is the
47 // same as the metrics client ID.
48 extern const char kClientId[];
49 #endif
50
51 // The product release/distribution channel.
52 extern const char kChannel[];
53
54 // The total number of experiments the instance has.
55 extern const char kNumVariations[];
56
57 // The experiments chunk. Hashed experiment names separated by |,|. This is
58 // typically set by SetExperimentList.
59 extern const char kVariations[];
60
61 #if defined(OS_MACOSX)
62 namespace mac {
63
64 // Records Cocoa zombie/used-after-freed objects that resulted in a
65 // deliberate crash.
66 extern const char kZombie[];
67 extern const char kZombieTrace[];
68
69 } // namespace mac
70 #endif
71
72 } // namespace crash_keys
73
74 #endif // COMPONENTS_CRASH_KEYS_CRASH_KEYS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698