| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/browser_watcher/postmortem_report_collector.h" | 5 #include "components/browser_watcher/postmortem_report_collector.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <utility> | 12 #include <utility> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/debug/activity_analyzer.h" | 15 #include "base/debug/activity_analyzer.h" |
| 16 #include "base/debug/activity_tracker.h" | 16 #include "base/debug/activity_tracker.h" |
| 17 #include "base/files/file.h" | 17 #include "base/files/file.h" |
| 18 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
| 19 #include "base/files/file_util.h" | 19 #include "base/files/file_util.h" |
| 20 #include "base/files/memory_mapped_file.h" | 20 #include "base/files/memory_mapped_file.h" |
| 21 #include "base/files/scoped_file.h" | 21 #include "base/files/scoped_file.h" |
| 22 #include "base/files/scoped_temp_dir.h" | 22 #include "base/files/scoped_temp_dir.h" |
| 23 #include "base/memory/ptr_util.h" | 23 #include "base/memory/ptr_util.h" |
| 24 #include "base/metrics/persistent_memory_allocator.h" | 24 #include "base/metrics/persistent_memory_allocator.h" |
| 25 #include "base/process/process_handle.h" | 25 #include "base/process/process_handle.h" |
| 26 #include "base/stl_util.h" | 26 #include "base/stl_util.h" |
| 27 #include "base/threading/platform_thread.h" | 27 #include "base/threading/platform_thread.h" |
| 28 #include "components/browser_watcher/postmortem_report_extractor.h" | |
| 29 #include "components/browser_watcher/stability_data_names.h" | 28 #include "components/browser_watcher/stability_data_names.h" |
| 29 #include "components/browser_watcher/stability_report_extractor.h" |
| 30 #include "testing/gmock/include/gmock/gmock.h" | 30 #include "testing/gmock/include/gmock/gmock.h" |
| 31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
| 32 #include "third_party/crashpad/crashpad/client/crash_report_database.h" | 32 #include "third_party/crashpad/crashpad/client/crash_report_database.h" |
| 33 | 33 |
| 34 namespace browser_watcher { | 34 namespace browser_watcher { |
| 35 | 35 |
| 36 using base::debug::ActivityData; | 36 using base::debug::ActivityData; |
| 37 using base::debug::ActivityTrackerMemoryAllocator; | 37 using base::debug::ActivityTrackerMemoryAllocator; |
| 38 using base::debug::ActivityUserData; | 38 using base::debug::ActivityUserData; |
| 39 using base::debug::GlobalActivityTracker; | 39 using base::debug::GlobalActivityTracker; |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 PostmortemReportCollector collector(kProductName, kVersionNumber, | 753 PostmortemReportCollector collector(kProductName, kVersionNumber, |
| 754 kChannelName, &analyzer); | 754 kChannelName, &analyzer); |
| 755 StabilityReport report; | 755 StabilityReport report; |
| 756 ASSERT_EQ(SUCCESS, collector.CollectOneReport(debug_file_path(), &report)); | 756 ASSERT_EQ(SUCCESS, collector.CollectOneReport(debug_file_path(), &report)); |
| 757 | 757 |
| 758 // Validate the report. | 758 // Validate the report. |
| 759 ASSERT_EQ(SystemState::CLEAN, report.system_state().session_state()); | 759 ASSERT_EQ(SystemState::CLEAN, report.system_state().session_state()); |
| 760 } | 760 } |
| 761 | 761 |
| 762 } // namespace browser_watcher | 762 } // namespace browser_watcher |
| OLD | NEW |