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

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

Issue 2941893002: DO NOT SUBMIT: results of old clang-format (Closed)
Patch Set: Created 3 years, 6 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 currently_executing_task_queue_; 529 currently_executing_task_queue_;
530 currently_executing_task_queue_ = queue; 530 currently_executing_task_queue_ = queue;
531 task_annotator_.RunTask("TaskQueueManager::PostTask", &pending_task); 531 task_annotator_.RunTask("TaskQueueManager::PostTask", &pending_task);
532 // Detect if the TaskQueueManager just got deleted. If this happens we must 532 // Detect if the TaskQueueManager just got deleted. If this happens we must
533 // not access any member variables after this point. 533 // not access any member variables after this point.
534 if (protect->HasOneRef()) 534 if (protect->HasOneRef())
535 return ProcessTaskResult::TASK_QUEUE_MANAGER_DELETED; 535 return ProcessTaskResult::TASK_QUEUE_MANAGER_DELETED;
536 536
537 currently_executing_task_queue_ = prev_executing_task_queue; 537 currently_executing_task_queue_ = prev_executing_task_queue;
538 538
539
540 if (queue->GetShouldNotifyObservers()) { 539 if (queue->GetShouldNotifyObservers()) {
541 if (task_start_time) { 540 if (task_start_time) {
542 *time_after_task = real_time_domain()->Now(); 541 *time_after_task = real_time_domain()->Now();
543 double task_end_time = MonotonicTimeInSeconds(*time_after_task); 542 double task_end_time = MonotonicTimeInSeconds(*time_after_task);
544 for (auto& observer : task_time_observers_) 543 for (auto& observer : task_time_observers_)
545 observer.DidProcessTask(queue, task_start_time, task_end_time); 544 observer.DidProcessTask(queue, task_start_time, task_end_time);
546 } 545 }
547 546
548 for (auto& observer : task_observers_) 547 for (auto& observer : task_observers_)
549 observer.DidProcessTask(pending_task); 548 observer.DidProcessTask(pending_task);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 for (const scoped_refptr<internal::TaskQueueImpl>& queue : queues_) { 703 for (const scoped_refptr<internal::TaskQueueImpl>& queue : queues_) {
705 TimeDomain* time_domain = queue->GetTimeDomain(); 704 TimeDomain* time_domain = queue->GetTimeDomain();
706 if (time_domain_now.find(time_domain) == time_domain_now.end()) 705 if (time_domain_now.find(time_domain) == time_domain_now.end())
707 time_domain_now.insert(std::make_pair(time_domain, time_domain->Now())); 706 time_domain_now.insert(std::make_pair(time_domain, time_domain->Now()));
708 queue->SweepCanceledDelayedTasks(time_domain_now[time_domain]); 707 queue->SweepCanceledDelayedTasks(time_domain_now[time_domain]);
709 } 708 }
710 } 709 }
711 710
712 } // namespace scheduler 711 } // namespace scheduler
713 } // namespace blink 712 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698