Chromium Code Reviews| Index: base/debug/crash_logging_unittest.cc |
| diff --git a/base/debug/crash_logging_unittest.cc b/base/debug/crash_logging_unittest.cc |
| index 4cd9f3e3b09f5a476bdd0d0f412371b54e31ce0e..356a72cd54fb9520613723d638edd5b71f861b22 100644 |
| --- a/base/debug/crash_logging_unittest.cc |
| +++ b/base/debug/crash_logging_unittest.cc |
| @@ -7,12 +7,13 @@ |
| #include <map> |
| #include <string> |
| +#include "base/at_exit.h" |
| #include "base/bind.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| namespace { |
| -std::map<std::string, std::string>* key_values_ = NULL; |
| +std::map<std::string, std::string>* key_values_ = nullptr; |
| } // namespace |
| @@ -26,10 +27,8 @@ class CrashLoggingTest : public testing::Test { |
| } |
| void TearDown() override { |
| - base::debug::ResetCrashLoggingForTesting(); |
| - |
| delete key_values_; |
| - key_values_ = NULL; |
| + key_values_ = nullptr; |
| } |
| private: |
| @@ -41,6 +40,8 @@ class CrashLoggingTest : public testing::Test { |
| static void ClearKeyValue(const base::StringPiece& key) { |
| key_values_->erase(key.as_string()); |
| } |
| + |
| + base::ShadowingAtExitManager at_exit_manager_; |
|
danakj
2015/09/24 21:08:36
Can you leave a comment explaining why this is her
Robert Sesek
2015/09/24 21:28:19
Done.
|
| }; |
| TEST_F(CrashLoggingTest, SetClearSingle) { |