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

Side by Side Diff: base/test/test_mock_time_task_runner.h

Issue 807503002: Implement throttling logic for fetching affiliation information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aff_database
Patch Set: Fix ambiguity with pow() on Android. Created 5 years, 10 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 | « no previous file | base/test/test_mock_time_task_runner.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 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 #ifndef BASE_TEST_TEST_MOCK_TIME_TASK_RUNNER_H_ 5 #ifndef BASE_TEST_TEST_MOCK_TIME_TASK_RUNNER_H_
6 #define BASE_TEST_TEST_MOCK_TIME_TASK_RUNNER_H_ 6 #define BASE_TEST_TEST_MOCK_TIME_TASK_RUNNER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void RunUntilIdle(); 53 void RunUntilIdle();
54 54
55 // Returns the current virtual time. 55 // Returns the current virtual time.
56 TimeTicks GetCurrentMockTime() const; 56 TimeTicks GetCurrentMockTime() const;
57 57
58 // Returns a TickClock that uses the mock time of |this| as its time source. 58 // Returns a TickClock that uses the mock time of |this| as its time source.
59 // The returned TickClock will hold a reference to |this|. 59 // The returned TickClock will hold a reference to |this|.
60 scoped_ptr<TickClock> GetMockTickClock() const; 60 scoped_ptr<TickClock> GetMockTickClock() const;
61 61
62 bool HasPendingTask() const; 62 bool HasPendingTask() const;
63 size_t GetPendingTaskCount() const;
63 TimeDelta NextPendingTaskDelay() const; 64 TimeDelta NextPendingTaskDelay() const;
64 65
65 // SingleThreadTaskRunner: 66 // SingleThreadTaskRunner:
66 bool RunsTasksOnCurrentThread() const override; 67 bool RunsTasksOnCurrentThread() const override;
67 bool PostDelayedTask(const tracked_objects::Location& from_here, 68 bool PostDelayedTask(const tracked_objects::Location& from_here,
68 const base::Closure& task, 69 const base::Closure& task,
69 TimeDelta delay) override; 70 TimeDelta delay) override;
70 bool PostNonNestableDelayedTask( 71 bool PostNonNestableDelayedTask(
71 const tracked_objects::Location& from_here, 72 const tracked_objects::Location& from_here,
72 const base::Closure& task, 73 const base::Closure& task,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // |tasks_lock_| is held. 114 // |tasks_lock_| is held.
114 TaskPriorityQueue tasks_; 115 TaskPriorityQueue tasks_;
115 base::Lock tasks_lock_; 116 base::Lock tasks_lock_;
116 117
117 DISALLOW_COPY_AND_ASSIGN(TestMockTimeTaskRunner); 118 DISALLOW_COPY_AND_ASSIGN(TestMockTimeTaskRunner);
118 }; 119 };
119 120
120 } // namespace base 121 } // namespace base
121 122
122 #endif // BASE_TEST_TEST_MOCK_TIME_TASK_RUNNER_H_ 123 #endif // BASE_TEST_TEST_MOCK_TIME_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « no previous file | base/test/test_mock_time_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698