Index: media/base/crash_keys.cc |
diff --git a/media/base/crash_keys.cc b/media/base/crash_keys.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..254eeeb1646d42f60ab8ab77d414b5c0fde59576 |
--- /dev/null |
+++ b/media/base/crash_keys.cc |
@@ -0,0 +1,35 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "media/base/crash_keys.h" |
+ |
+#include <vector> |
+ |
+#include "base/debug/crash_logging.h" |
+#include "base/logging.h" |
+#include "build/build_config.h" |
+#include "components/crash/core/common/crash_keys.h" |
+ |
+namespace crash_keys { |
+ |
+#if defined(OS_WIN) |
+const char kHungAudioThreadDetails[] = "hung-audio-thread-details"; |
+#endif |
+ |
+const char kZeroEncodeDetails[] = "zero-encode-details"; |
+ |
+void AppendMediaCrashKeys(std::vector<base::debug::CrashKey>* keys) { |
+ DCHECK(keys); |
+ |
+ const std::vector<base::debug::CrashKey> media_keys = { |
+#if defined(OS_WIN) |
+ {kHungAudioThreadDetails, kSmallSize}, |
+#endif |
+ {kZeroEncodeDetails, kSmallSize}, |
+ }; |
+ |
+ keys->insert(keys->end(), media_keys.begin(), media_keys.end()); |
+} |
+ |
+} // namespace crash_keys |