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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "platform/scheduler/base/task_queue_manager.h" 5 #include "platform/scheduler/base/task_queue_manager.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 currently_executing_task_queue_; 531 currently_executing_task_queue_;
532 currently_executing_task_queue_ = queue; 532 currently_executing_task_queue_ = queue;
533 task_annotator_.RunTask("TaskQueueManager::PostTask", &pending_task); 533 task_annotator_.RunTask("TaskQueueManager::PostTask", &pending_task);
534 // Detect if the TaskQueueManager just got deleted. If this happens we must 534 // Detect if the TaskQueueManager just got deleted. If this happens we must
535 // not access any member variables after this point. 535 // not access any member variables after this point.
536 if (protect->HasOneRef()) 536 if (protect->HasOneRef())
537 return ProcessTaskResult::TASK_QUEUE_MANAGER_DELETED; 537 return ProcessTaskResult::TASK_QUEUE_MANAGER_DELETED;
538 538
539 currently_executing_task_queue_ = prev_executing_task_queue; 539 currently_executing_task_queue_ = prev_executing_task_queue;
540 540
541
542 if (queue->GetShouldNotifyObservers()) { 541 if (queue->GetShouldNotifyObservers()) {
543 if (task_start_time) { 542 if (task_start_time) {
544 *time_after_task = real_time_domain()->Now(); 543 *time_after_task = real_time_domain()->Now();
545 double task_end_time = MonotonicTimeInSeconds(*time_after_task); 544 double task_end_time = MonotonicTimeInSeconds(*time_after_task);
546 for (auto& observer : task_time_observers_) 545 for (auto& observer : task_time_observers_)
547 observer.didProcessTask(queue, task_start_time, task_end_time); 546 observer.didProcessTask(queue, task_start_time, task_end_time);
548 } 547 }
549 548
550 for (auto& observer : task_observers_) 549 for (auto& observer : task_observers_)
551 observer.DidProcessTask(pending_task); 550 observer.DidProcessTask(pending_task);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 for (const scoped_refptr<internal::TaskQueueImpl>& queue : queues_) { 704 for (const scoped_refptr<internal::TaskQueueImpl>& queue : queues_) {
706 TimeDomain* time_domain = queue->GetTimeDomain(); 705 TimeDomain* time_domain = queue->GetTimeDomain();
707 if (time_domain_now.find(time_domain) == time_domain_now.end()) 706 if (time_domain_now.find(time_domain) == time_domain_now.end())
708 time_domain_now.insert(std::make_pair(time_domain, time_domain->Now())); 707 time_domain_now.insert(std::make_pair(time_domain, time_domain->Now()));
709 queue->SweepCanceledDelayedTasks(time_domain_now[time_domain]); 708 queue->SweepCanceledDelayedTasks(time_domain_now[time_domain]);
710 } 709 }
711 } 710 }
712 711
713 } // namespace scheduler 712 } // namespace scheduler
714 } // namespace blink 713 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698