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

Unified Diff: components/scheduler/child/web_task_runner_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 | « components/scheduler/child/web_scheduler_impl.cc ('k') | components/scheduler/child/webthread_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/web_task_runner_impl.cc
diff --git a/components/scheduler/child/web_task_runner_impl.cc b/components/scheduler/child/web_task_runner_impl.cc
index d04af7f8ca15b83f492c7f98b6267b9a1e66c44f..922ca4a95ed81793f7c6b432c13549c611d3d8bb 100644
--- a/components/scheduler/child/web_task_runner_impl.cc
+++ b/components/scheduler/child/web_task_runner_impl.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/memory/ptr_util.h"
#include "components/scheduler/base/task_queue.h"
#include "components/scheduler/base/time_domain.h"
#include "third_party/WebKit/public/platform/WebTraceLocation.h"
@@ -18,23 +17,29 @@
WebTaskRunnerImpl::~WebTaskRunnerImpl() {}
-void WebTaskRunnerImpl::postTask(const blink::WebTraceLocation& location,
+void WebTaskRunnerImpl::postTask(const blink::WebTraceLocation& web_location,
blink::WebTaskRunner::Task* task) {
+ tracked_objects::Location location(web_location.functionName(),
+ web_location.fileName(), -1, nullptr);
task_queue_->PostTask(
location,
- base::Bind(&WebTaskRunnerImpl::runTask,
- base::Passed(base::WrapUnique(task))));
+ base::Bind(
+ &WebTaskRunnerImpl::runTask,
+ base::Passed(std::unique_ptr<blink::WebTaskRunner::Task>(task))));
}
void WebTaskRunnerImpl::postDelayedTask(
- const blink::WebTraceLocation& location,
+ const blink::WebTraceLocation& web_location,
blink::WebTaskRunner::Task* task,
double delayMs) {
DCHECK_GE(delayMs, 0.0);
+ tracked_objects::Location location(web_location.functionName(),
+ web_location.fileName(), -1, nullptr);
task_queue_->PostDelayedTask(
location,
- base::Bind(&WebTaskRunnerImpl::runTask,
- base::Passed(base::WrapUnique(task))),
+ base::Bind(
+ &WebTaskRunnerImpl::runTask,
+ base::Passed(std::unique_ptr<blink::WebTaskRunner::Task>(task))),
base::TimeDelta::FromMillisecondsD(delayMs));
}
« no previous file with comments | « components/scheduler/child/web_scheduler_impl.cc ('k') | components/scheduler/child/webthread_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698