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

Unified Diff: components/scheduler/renderer/renderer_scheduler_impl.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 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
Index: components/scheduler/renderer/renderer_scheduler_impl.cc
diff --git a/components/scheduler/renderer/renderer_scheduler_impl.cc b/components/scheduler/renderer/renderer_scheduler_impl.cc
index 5ed3d6d12d91062b9579ad61cefc601a04eec780..4ca86ecf75ed873f8882be9a0b299203e6d2cd9b 100644
--- a/components/scheduler/renderer/renderer_scheduler_impl.cc
+++ b/components/scheduler/renderer/renderer_scheduler_impl.cc
@@ -362,44 +362,41 @@ void RendererSchedulerImpl::UpdatePolicyLocked(UpdateType update_type) {
new_policy == current_policy_)
return;
- PrioritizingTaskQueueSelector* task_queue_selector =
- helper_.SchedulerTaskQueueSelector();
bool policy_disables_timers = false;
switch (new_policy) {
case Policy::COMPOSITOR_PRIORITY:
- task_queue_selector->SetQueuePriority(
- COMPOSITOR_TASK_QUEUE, PrioritizingTaskQueueSelector::HIGH_PRIORITY);
+ helper_.SetQueuePriority(COMPOSITOR_TASK_QUEUE,
+ PrioritizingTaskQueueSelector::HIGH_PRIORITY);
// TODO(scheduler-dev): Add a task priority between HIGH and BEST_EFFORT
// that still has some guarantee of running.
- task_queue_selector->SetQueuePriority(
+ helper_.SetQueuePriority(
LOADING_TASK_QUEUE,
PrioritizingTaskQueueSelector::BEST_EFFORT_PRIORITY);
break;
case Policy::TOUCHSTART_PRIORITY:
- task_queue_selector->SetQueuePriority(
- COMPOSITOR_TASK_QUEUE, PrioritizingTaskQueueSelector::HIGH_PRIORITY);
- task_queue_selector->DisableQueue(LOADING_TASK_QUEUE);
+ helper_.SetQueuePriority(COMPOSITOR_TASK_QUEUE,
+ PrioritizingTaskQueueSelector::HIGH_PRIORITY);
+ helper_.DisableQueue(LOADING_TASK_QUEUE);
// TODO(alexclarke): Set policy_disables_timers once the blink TimerBase
// refactor is safely landed.
break;
case Policy::NORMAL:
- task_queue_selector->SetQueuePriority(
- COMPOSITOR_TASK_QUEUE,
- PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
- task_queue_selector->SetQueuePriority(
- LOADING_TASK_QUEUE, PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
+ helper_.SetQueuePriority(COMPOSITOR_TASK_QUEUE,
+ PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
+ helper_.SetQueuePriority(LOADING_TASK_QUEUE,
+ PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
break;
}
if (timer_queue_suspend_count_ != 0 || policy_disables_timers) {
- task_queue_selector->DisableQueue(TIMER_TASK_QUEUE);
+ helper_.DisableQueue(TIMER_TASK_QUEUE);
} else {
- helper_.SchedulerTaskQueueSelector()->SetQueuePriority(
- TIMER_TASK_QUEUE, PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
+ helper_.SetQueuePriority(TIMER_TASK_QUEUE,
+ PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
}
- DCHECK(task_queue_selector->IsQueueEnabled(COMPOSITOR_TASK_QUEUE));
+ DCHECK(helper_.IsQueueEnabled(COMPOSITOR_TASK_QUEUE));
if (new_policy != Policy::TOUCHSTART_PRIORITY)
- DCHECK(task_queue_selector->IsQueueEnabled(LOADING_TASK_QUEUE));
+ DCHECK(helper_.IsQueueEnabled(LOADING_TASK_QUEUE));
current_policy_ = new_policy;
@@ -507,8 +504,7 @@ void RendererSchedulerImpl::SuspendTimerQueue() {
helper_.CheckOnValidThread();
timer_queue_suspend_count_++;
ForceUpdatePolicy();
- DCHECK(
- !helper_.SchedulerTaskQueueSelector()->IsQueueEnabled(TIMER_TASK_QUEUE));
+ DCHECK(!helper_.IsQueueEnabled(TIMER_TASK_QUEUE));
}
void RendererSchedulerImpl::ResumeTimerQueue() {
« no previous file with comments | « components/scheduler/child/scheduler_helper.cc ('k') | components/sessions/content/content_serialized_navigation_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698