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

Unified Diff: components/scheduler/child/web_scheduler_impl.cc

Issue 2218933003: Revert of Make WebTraceLocation be an alias of tracked_objects::Location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | components/scheduler/child/web_task_runner_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/web_scheduler_impl.cc
diff --git a/components/scheduler/child/web_scheduler_impl.cc b/components/scheduler/child/web_scheduler_impl.cc
index 2025f17605d023374cbb067bd0630e72dd96abb3..cc1a2ecc65c1f796aee74f32d77ee7d7ddd4e313 100644
--- a/components/scheduler/child/web_scheduler_impl.cc
+++ b/components/scheduler/child/web_scheduler_impl.cc
@@ -5,7 +5,6 @@
#include "components/scheduler/child/web_scheduler_impl.h"
#include "base/bind.h"
-#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "components/scheduler/child/web_task_runner_impl.h"
#include "components/scheduler/child/worker_scheduler.h"
@@ -46,33 +45,39 @@
task->run((deadline - base::TimeTicks()).InSecondsF());
}
-void WebSchedulerImpl::postIdleTask(const blink::WebTraceLocation& location,
+void WebSchedulerImpl::postIdleTask(const blink::WebTraceLocation& web_location,
blink::WebThread::IdleTask* task) {
DCHECK(idle_task_runner_);
+ std::unique_ptr<blink::WebThread::IdleTask> scoped_task(task);
+ tracked_objects::Location location(web_location.functionName(),
+ web_location.fileName(), -1, nullptr);
idle_task_runner_->PostIdleTask(
location,
- base::Bind(&WebSchedulerImpl::runIdleTask,
- base::Passed(base::WrapUnique(task))));
+ base::Bind(&WebSchedulerImpl::runIdleTask, base::Passed(&scoped_task)));
}
void WebSchedulerImpl::postNonNestableIdleTask(
- const blink::WebTraceLocation& location,
+ const blink::WebTraceLocation& web_location,
blink::WebThread::IdleTask* task) {
DCHECK(idle_task_runner_);
+ std::unique_ptr<blink::WebThread::IdleTask> scoped_task(task);
+ tracked_objects::Location location(web_location.functionName(),
+ web_location.fileName(), -1, nullptr);
idle_task_runner_->PostNonNestableIdleTask(
location,
- base::Bind(&WebSchedulerImpl::runIdleTask,
- base::Passed(base::WrapUnique(task))));
+ base::Bind(&WebSchedulerImpl::runIdleTask, base::Passed(&scoped_task)));
}
void WebSchedulerImpl::postIdleTaskAfterWakeup(
- const blink::WebTraceLocation& location,
+ const blink::WebTraceLocation& web_location,
blink::WebThread::IdleTask* task) {
DCHECK(idle_task_runner_);
+ std::unique_ptr<blink::WebThread::IdleTask> scoped_task(task);
+ tracked_objects::Location location(web_location.functionName(),
+ web_location.fileName(), -1, nullptr);
idle_task_runner_->PostIdleTaskAfterWakeup(
location,
- base::Bind(&WebSchedulerImpl::runIdleTask,
- base::Passed(base::WrapUnique(task))));
+ base::Bind(&WebSchedulerImpl::runIdleTask, base::Passed(&scoped_task)));
}
blink::WebTaskRunner* WebSchedulerImpl::loadingTaskRunner() {
« no previous file with comments | « no previous file | components/scheduler/child/web_task_runner_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698