| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/trace_event/memory_dump_manager.h" | 5 #include "base/trace_event/memory_dump_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 if (enable_mock_destructor) | 140 if (enable_mock_destructor) |
| 141 Destructor(); | 141 Destructor(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 bool enable_mock_destructor; | 144 bool enable_mock_destructor; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 class TestSequencedTaskRunner : public SequencedTaskRunner { | 147 class TestSequencedTaskRunner : public SequencedTaskRunner { |
| 148 public: | 148 public: |
| 149 TestSequencedTaskRunner() | 149 TestSequencedTaskRunner() |
| 150 : worker_pool_( | 150 : worker_pool_(new SequencedWorkerPool(2 /* max_threads */, |
| 151 new SequencedWorkerPool(2 /* max_threads */, "Test Task Runner")), | 151 "Test Task Runner", |
| 152 base::TaskPriority::USER_VISIBLE)), |
| 152 enabled_(true), | 153 enabled_(true), |
| 153 num_of_post_tasks_(0) {} | 154 num_of_post_tasks_(0) {} |
| 154 | 155 |
| 155 void set_enabled(bool value) { enabled_ = value; } | 156 void set_enabled(bool value) { enabled_ = value; } |
| 156 unsigned no_of_post_tasks() const { return num_of_post_tasks_; } | 157 unsigned no_of_post_tasks() const { return num_of_post_tasks_; } |
| 157 | 158 |
| 158 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 159 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
| 159 const Closure& task, | 160 const Closure& task, |
| 160 TimeDelta delay) override { | 161 TimeDelta delay) override { |
| 161 NOTREACHED(); | 162 NOTREACHED(); |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 MemoryDumpLevelOfDetail::DETAILED); | 1163 MemoryDumpLevelOfDetail::DETAILED); |
| 1163 EXPECT_FALSE(last_callback_success_); | 1164 EXPECT_FALSE(last_callback_success_); |
| 1164 | 1165 |
| 1165 ASSERT_TRUE(IsPeriodicDumpingEnabled()); | 1166 ASSERT_TRUE(IsPeriodicDumpingEnabled()); |
| 1166 run_loop.Run(); | 1167 run_loop.Run(); |
| 1167 DisableTracing(); | 1168 DisableTracing(); |
| 1168 } | 1169 } |
| 1169 | 1170 |
| 1170 } // namespace trace_event | 1171 } // namespace trace_event |
| 1171 } // namespace base | 1172 } // namespace base |
| OLD | NEW |