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

Unified Diff: components/scheduler/child/scheduler_helper.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/child/scheduler_helper.cc
diff --git a/components/scheduler/child/scheduler_helper.cc b/components/scheduler/child/scheduler_helper.cc
index 19e8d2b65120525765527af4775d9564d2590f51..cb2d191ee2860f15286c881df60117ac61a86821 100644
--- a/components/scheduler/child/scheduler_helper.cc
+++ b/components/scheduler/child/scheduler_helper.cc
@@ -7,7 +7,6 @@
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
#include "components/scheduler/child/nestable_single_thread_task_runner.h"
-#include "components/scheduler/child/prioritizing_task_queue_selector.h"
#include "components/scheduler/child/time_source.h"
namespace scheduler {
@@ -336,11 +335,6 @@ SchedulerHelper::IdlePeriodState SchedulerHelper::SchedulerIdlePeriodState()
return idle_period_state_;
}
-PrioritizingTaskQueueSelector* SchedulerHelper::SchedulerTaskQueueSelector()
- const {
- return task_queue_selector_.get();
-}
-
scoped_refptr<base::SingleThreadTaskRunner> SchedulerHelper::TaskRunnerForQueue(
size_t queue_index) const {
CheckOnValidThread();
@@ -357,6 +351,30 @@ bool SchedulerHelper::IsQueueEmpty(size_t queue_index) const {
return task_queue_manager_->IsQueueEmpty(queue_index);
}
+void SchedulerHelper::SetQueuePriority(
+ size_t queue_index,
+ PrioritizingTaskQueueSelector::QueuePriority priority) {
+ CheckOnValidThread();
+ return task_queue_selector_->SetQueuePriority(queue_index, priority);
+}
+
+void SchedulerHelper::EnableQueue(
+ size_t queue_index,
+ PrioritizingTaskQueueSelector::QueuePriority priority) {
+ CheckOnValidThread();
+ task_queue_selector_->EnableQueue(queue_index, priority);
+}
+
+void SchedulerHelper::DisableQueue(size_t queue_index) {
+ CheckOnValidThread();
+ task_queue_selector_->DisableQueue(queue_index);
+}
+
+bool SchedulerHelper::IsQueueEnabled(size_t queue_index) const {
+ CheckOnValidThread();
+ return task_queue_selector_->IsQueueEnabled(queue_index);
+}
+
// static
const char* SchedulerHelper::TaskQueueIdToString(QueueId queue_id) {
switch (queue_id) {
« no previous file with comments | « components/scheduler/child/scheduler_helper.h ('k') | components/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698