Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Side by Side Diff: base/task_scheduler/scheduler_worker_unittest.cc~RF3e0a7fad.TMP

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/message_loop/message_pump_perftest.cc ('k') | base/win/object_watcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/task_scheduler/scheduler_worker.h" 5 #include "base/task_scheduler/scheduler_worker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 23 matching lines...) Expand all
34 namespace internal { 34 namespace internal {
35 namespace { 35 namespace {
36 36
37 const size_t kNumSequencesPerTest = 150; 37 const size_t kNumSequencesPerTest = 150;
38 38
39 class SchedulerWorkerDefaultDelegate : public SchedulerWorker::Delegate { 39 class SchedulerWorkerDefaultDelegate : public SchedulerWorker::Delegate {
40 public: 40 public:
41 SchedulerWorkerDefaultDelegate() = default; 41 SchedulerWorkerDefaultDelegate() = default;
42 42
43 // SchedulerWorker::Delegate: 43 // SchedulerWorker::Delegate:
44 void OnMainEntry(SchedulerWorker* worker, 44 void OnMainEntry(SchedulerWorker* worker, const TimeDelta& detach_duration) ov erride {}
45 const TimeDelta& detach_duration) override {} 45 scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override { return nul lptr; }
46 scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override {
47 return nullptr;
48 }
49 void ReEnqueueSequence(scoped_refptr<Sequence> sequence) override { 46 void ReEnqueueSequence(scoped_refptr<Sequence> sequence) override {
50 ADD_FAILURE() << "Unexpected call to ReEnqueueSequence()"; 47 ADD_FAILURE() << "Unexpected call to ReEnqueueSequence()";
51 } 48 }
52 TimeDelta GetSleepTimeout() override { return TimeDelta::Max(); } 49 TimeDelta GetSleepTimeout() override { return TimeDelta::Max(); }
53 bool CanDetach(SchedulerWorker* worker) override { return false; } 50 bool CanDetach(SchedulerWorker* worker) override { return false; }
54 51
55 private: 52 private:
56 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerDefaultDelegate); 53 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerDefaultDelegate);
57 }; 54 };
58 55
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // OnMainEntry() and GetWork() are called. 543 // OnMainEntry() and GetWork() are called.
547 worker->WakeUp(); 544 worker->WakeUp();
548 delegate_raw->WaitForPriorityVerifiedInGetWork(); 545 delegate_raw->WaitForPriorityVerifiedInGetWork();
549 546
550 worker->JoinForTesting(); 547 worker->JoinForTesting();
551 } 548 }
552 549
553 } // namespace 550 } // namespace
554 } // namespace internal 551 } // namespace internal
555 } // namespace base 552 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_perftest.cc ('k') | base/win/object_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698