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

Unified Diff: base/task_scheduler/sequence_sort_key.cc

Issue 1903133003: TaskScheduler: Avoid Sequence refcount bump in GetWork() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile (why did this compile locally?! Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/task_scheduler/sequence_sort_key.h ('k') | base/task_scheduler/sequence_sort_key_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/sequence_sort_key.cc
diff --git a/base/task_scheduler/sequence_sort_key.cc b/base/task_scheduler/sequence_sort_key.cc
index 758a411b496f1c3aa998de4df0a576b8591c06a4..e356c8b7cc7896912c132df5e6dcdf56ca4d53ad 100644
--- a/base/task_scheduler/sequence_sort_key.cc
+++ b/base/task_scheduler/sequence_sort_key.cc
@@ -9,19 +9,20 @@ namespace internal {
SequenceSortKey::SequenceSortKey(TaskPriority priority,
TimeTicks next_task_sequenced_time)
- : priority(priority), next_task_sequenced_time(next_task_sequenced_time) {}
+ : priority_(priority),
+ next_task_sequenced_time_(next_task_sequenced_time) {}
bool SequenceSortKey::operator<(const SequenceSortKey& other) const {
// This SequenceSortKey is considered less important than |other| if it has a
// lower priority or if it has the same priority but its next task was posted
// later than |other|'s.
const int priority_diff =
- static_cast<int>(priority) - static_cast<int>(other.priority);
+ static_cast<int>(priority_) - static_cast<int>(other.priority_);
if (priority_diff < 0)
return true;
if (priority_diff > 0)
return false;
- return next_task_sequenced_time > other.next_task_sequenced_time;
+ return next_task_sequenced_time_ > other.next_task_sequenced_time_;
}
} // namespace internal
« no previous file with comments | « base/task_scheduler/sequence_sort_key.h ('k') | base/task_scheduler/sequence_sort_key_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698