| 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 <utility> | 10 #include <utility> |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 OnceClosure task, | 201 OnceClosure task, |
| 202 TimeDelta delay) override { | 202 TimeDelta delay) override { |
| 203 num_of_post_tasks_++; | 203 num_of_post_tasks_++; |
| 204 if (enabled_) { | 204 if (enabled_) { |
| 205 return worker_pool_.pool()->PostSequencedWorkerTask(token_, from_here, | 205 return worker_pool_.pool()->PostSequencedWorkerTask(token_, from_here, |
| 206 std::move(task)); | 206 std::move(task)); |
| 207 } | 207 } |
| 208 return false; | 208 return false; |
| 209 } | 209 } |
| 210 | 210 |
| 211 bool RunsTasksOnCurrentThread() const override { | 211 bool RunsTasksInCurrentSequence() const override { |
| 212 return worker_pool_.pool()->RunsTasksOnCurrentThread(); | 212 return worker_pool_.pool()->RunsTasksInCurrentSequence(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 private: | 215 private: |
| 216 ~TestSequencedTaskRunner() override {} | 216 ~TestSequencedTaskRunner() override {} |
| 217 | 217 |
| 218 SequencedWorkerPoolOwner worker_pool_; | 218 SequencedWorkerPoolOwner worker_pool_; |
| 219 const SequencedWorkerPool::SequenceToken token_; | 219 const SequencedWorkerPool::SequenceToken token_; |
| 220 bool enabled_; | 220 bool enabled_; |
| 221 unsigned num_of_post_tasks_; | 221 unsigned num_of_post_tasks_; |
| 222 }; | 222 }; |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 // successful we also managed to add the dump to the trace. | 1313 // successful we also managed to add the dump to the trace. |
| 1314 EXPECT_FALSE(last_callback_success_); | 1314 EXPECT_FALSE(last_callback_success_); |
| 1315 | 1315 |
| 1316 mdm_->Disable(); | 1316 mdm_->Disable(); |
| 1317 | 1317 |
| 1318 mdm_->UnregisterDumpProvider(&mdp); | 1318 mdm_->UnregisterDumpProvider(&mdp); |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 } // namespace trace_event | 1321 } // namespace trace_event |
| 1322 } // namespace base | 1322 } // namespace base |
| OLD | NEW |