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

Unified Diff: third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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: third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h
diff --git a/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h b/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h
index 2eb7f1122c8c35db353bcb1c52707d10be7f314f..6b5741da652c8bb5bb509edb6a8dc23571ff0fe0 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h
@@ -19,9 +19,7 @@ class TaskQueue;
class BLINK_PLATFORM_EXPORT WebTaskRunnerImpl : public WebTaskRunner {
public:
- explicit WebTaskRunnerImpl(scoped_refptr<TaskQueue> task_queue);
-
- ~WebTaskRunnerImpl() override;
+ static RefPtr<WebTaskRunnerImpl> create(scoped_refptr<TaskQueue> task_queue);
// WebTaskRunner implementation:
void postDelayedTask(const WebTraceLocation&,
@@ -30,10 +28,12 @@ class BLINK_PLATFORM_EXPORT WebTaskRunnerImpl : public WebTaskRunner {
bool runsTasksOnCurrentThread() override;
double virtualTimeSeconds() const override;
double monotonicallyIncreasingVirtualTimeSeconds() const override;
- std::unique_ptr<WebTaskRunner> clone() override;
base::SingleThreadTaskRunner* toSingleThreadTaskRunner() override;
private:
+ explicit WebTaskRunnerImpl(scoped_refptr<TaskQueue> task_queue);
+ ~WebTaskRunnerImpl() override;
+
base::TimeTicks Now() const;
scoped_refptr<TaskQueue> task_queue_;

Powered by Google App Engine
This is Rietveld 408576698