Chromium Code Reviews| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 | 180 |
| 181 bool PostDelayedTask(const tracked_objects::Location& from_here, | 181 bool PostDelayedTask(const tracked_objects::Location& from_here, |
| 182 const Closure& task, | 182 const Closure& task, |
| 183 TimeDelta delay) override { | 183 TimeDelta delay) override { |
| 184 num_of_post_tasks_++; | 184 num_of_post_tasks_++; |
| 185 if (enabled_) | 185 if (enabled_) |
| 186 return worker_pool_->PostSequencedWorkerTask(token_, from_here, task); | 186 return worker_pool_->PostSequencedWorkerTask(token_, from_here, task); |
| 187 return false; | 187 return false; |
| 188 } | 188 } |
| 189 | 189 |
| 190 bool RunsTasksOnCurrentThread() const override { | 190 bool RunsTasksOnCurrentThread() const override { |
|
fdoray
2016/09/07 14:36:15
RunsTasksOnCurrentThread() is supposed to "Returns
| |
| 191 return worker_pool_->IsRunningSequenceOnCurrentThread(token_); | 191 return worker_pool_->RunsTasksOnCurrentThread(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 private: | 194 private: |
| 195 ~TestSequencedTaskRunner() override {} | 195 ~TestSequencedTaskRunner() override {} |
| 196 | 196 |
| 197 scoped_refptr<SequencedWorkerPool> worker_pool_; | 197 scoped_refptr<SequencedWorkerPool> worker_pool_; |
| 198 const SequencedWorkerPool::SequenceToken token_; | 198 const SequencedWorkerPool::SequenceToken token_; |
| 199 bool enabled_; | 199 bool enabled_; |
| 200 unsigned num_of_post_tasks_; | 200 unsigned num_of_post_tasks_; |
| 201 }; | 201 }; |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1186 MemoryDumpLevelOfDetail::DETAILED); | 1186 MemoryDumpLevelOfDetail::DETAILED); |
| 1187 EXPECT_FALSE(last_callback_success_); | 1187 EXPECT_FALSE(last_callback_success_); |
| 1188 | 1188 |
| 1189 ASSERT_TRUE(IsPeriodicDumpingEnabled()); | 1189 ASSERT_TRUE(IsPeriodicDumpingEnabled()); |
| 1190 run_loop.Run(); | 1190 run_loop.Run(); |
| 1191 DisableTracing(); | 1191 DisableTracing(); |
| 1192 } | 1192 } |
| 1193 | 1193 |
| 1194 } // namespace trace_event | 1194 } // namespace trace_event |
| 1195 } // namespace base | 1195 } // namespace base |
| OLD | NEW |