| 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 #include "base/debug/crash_logging.h" | 5 #include "base/debug/crash_logging.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/debug/stack_trace.h" | 10 #include "base/debug/stack_trace.h" |
| 11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 | 15 |
| 16 #undef ScopedCrashKey |
| 17 |
| 16 namespace base { | 18 namespace base { |
| 17 namespace debug { | 19 namespace debug { |
| 18 | 20 |
| 19 namespace { | 21 namespace { |
| 20 | 22 |
| 21 // Global map of crash key names to registration entries. | 23 // Global map of crash key names to registration entries. |
| 22 typedef std::map<base::StringPiece, CrashKey> CrashKeyMap; | 24 typedef std::map<base::StringPiece, CrashKey> CrashKeyMap; |
| 23 CrashKeyMap* g_crash_keys_ = NULL; | 25 CrashKeyMap* g_crash_keys_ = NULL; |
| 24 | 26 |
| 25 // The maximum length of a single chunk. | 27 // The maximum length of a single chunk. |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 void ResetCrashLoggingForTesting() { | 196 void ResetCrashLoggingForTesting() { |
| 195 delete g_crash_keys_; | 197 delete g_crash_keys_; |
| 196 g_crash_keys_ = NULL; | 198 g_crash_keys_ = NULL; |
| 197 g_chunk_max_length_ = 0; | 199 g_chunk_max_length_ = 0; |
| 198 g_set_key_func_ = NULL; | 200 g_set_key_func_ = NULL; |
| 199 g_clear_key_func_ = NULL; | 201 g_clear_key_func_ = NULL; |
| 200 } | 202 } |
| 201 | 203 |
| 202 } // namespace debug | 204 } // namespace debug |
| 203 } // namespace base | 205 } // namespace base |
| OLD | NEW |