OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_DEBUG_CRASH_LOGGING_H_ | 5 #ifndef BASE_DEBUG_CRASH_LOGGING_H_ |
6 #define BASE_DEBUG_CRASH_LOGGING_H_ | 6 #define BASE_DEBUG_CRASH_LOGGING_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 private: | 50 private: |
51 std::string key_; | 51 std::string key_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(ScopedCrashKey); | 53 DISALLOW_COPY_AND_ASSIGN(ScopedCrashKey); |
54 }; | 54 }; |
55 | 55 |
56 // Before setting values for a key, all the keys must be registered. | 56 // Before setting values for a key, all the keys must be registered. |
57 struct BASE_EXPORT CrashKey { | 57 struct BASE_EXPORT CrashKey { |
58 // The name of the crash key, used in the above functions. | 58 // The name of the crash key, used in the above functions. |
59 const char* const key_name; | 59 const char* key_name; |
60 | 60 |
61 // The maximum length for a value. If the value is longer than this, it will | 61 // The maximum length for a value. If the value is longer than this, it will |
62 // be truncated. If the value is larger than the |chunk_max_length| passed to | 62 // be truncated. If the value is larger than the |chunk_max_length| passed to |
63 // InitCrashKeys() but less than this value, it will be split into multiple | 63 // InitCrashKeys() but less than this value, it will be split into multiple |
64 // numbered chunks. | 64 // numbered chunks. |
65 size_t max_length; | 65 size_t max_length; |
66 }; | 66 }; |
67 | 67 |
68 // Before the crash key logging mechanism can be used, all crash keys must be | 68 // Before the crash key logging mechanism can be used, all crash keys must be |
69 // registered with this function. The function returns the amount of space | 69 // registered with this function. The function returns the amount of space |
(...skipping 25 matching lines...) Expand all Loading... |
95 const base::StringPiece& value, | 95 const base::StringPiece& value, |
96 size_t chunk_max_length); | 96 size_t chunk_max_length); |
97 | 97 |
98 // Resets the crash key system so it can be reinitialized. For testing only. | 98 // Resets the crash key system so it can be reinitialized. For testing only. |
99 BASE_EXPORT void ResetCrashLoggingForTesting(); | 99 BASE_EXPORT void ResetCrashLoggingForTesting(); |
100 | 100 |
101 } // namespace debug | 101 } // namespace debug |
102 } // namespace base | 102 } // namespace base |
103 | 103 |
104 #endif // BASE_DEBUG_CRASH_LOGGING_H_ | 104 #endif // BASE_DEBUG_CRASH_LOGGING_H_ |
OLD | NEW |