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

Unified Diff: cc/trees/task_runner_provider.cc

Issue 1411663002: cc: Split Proxy to eliminate unnecessary dependencies on the impl side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update perf tests. Created 5 years, 2 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 | « cc/trees/task_runner_provider.h ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/task_runner_provider.cc
diff --git a/cc/trees/proxy.cc b/cc/trees/task_runner_provider.cc
similarity index 67%
copy from cc/trees/proxy.cc
copy to cc/trees/task_runner_provider.cc
index 58d10b910cbdd2ce1aa8fb10a3cdc3af04531a3a..053b047385fa02aadf3767e0115f774ce18c1929 100644
--- a/cc/trees/proxy.cc
+++ b/cc/trees/task_runner_provider.cc
@@ -2,24 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cc/trees/proxy.h"
-
#include "base/single_thread_task_runner.h"
#include "cc/trees/blocking_task_runner.h"
+#include "cc/trees/task_runner_provider.h"
namespace cc {
-base::SingleThreadTaskRunner* Proxy::MainThreadTaskRunner() const {
+base::SingleThreadTaskRunner* TaskRunnerProvider::MainThreadTaskRunner() const {
return main_task_runner_.get();
}
-bool Proxy::HasImplThread() const { return !!impl_task_runner_.get(); }
+bool TaskRunnerProvider::HasImplThread() const {
+ return !!impl_task_runner_.get();
+}
-base::SingleThreadTaskRunner* Proxy::ImplThreadTaskRunner() const {
+base::SingleThreadTaskRunner* TaskRunnerProvider::ImplThreadTaskRunner() const {
return impl_task_runner_.get();
}
-bool Proxy::IsMainThread() const {
+bool TaskRunnerProvider::IsMainThread() const {
#if DCHECK_IS_ON()
if (impl_thread_is_overridden_)
return false;
@@ -34,7 +35,7 @@ bool Proxy::IsMainThread() const {
#endif
}
-bool Proxy::IsImplThread() const {
+bool TaskRunnerProvider::IsImplThread() const {
#if DCHECK_IS_ON()
if (impl_thread_is_overridden_)
return true;
@@ -47,12 +48,12 @@ bool Proxy::IsImplThread() const {
}
#if DCHECK_IS_ON()
-void Proxy::SetCurrentThreadIsImplThread(bool is_impl_thread) {
+void TaskRunnerProvider::SetCurrentThreadIsImplThread(bool is_impl_thread) {
impl_thread_is_overridden_ = is_impl_thread;
}
#endif
-bool Proxy::IsMainThreadBlocked() const {
+bool TaskRunnerProvider::IsMainThreadBlocked() const {
#if DCHECK_IS_ON()
return is_main_thread_blocked_;
#else
@@ -61,13 +62,14 @@ bool Proxy::IsMainThreadBlocked() const {
}
#if DCHECK_IS_ON()
-void Proxy::SetMainThreadBlocked(bool is_main_thread_blocked) {
+void TaskRunnerProvider::SetMainThreadBlocked(bool is_main_thread_blocked) {
is_main_thread_blocked_ = is_main_thread_blocked;
}
#endif
-Proxy::Proxy(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner)
+TaskRunnerProvider::TaskRunnerProvider(
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner)
#if !DCHECK_IS_ON()
: main_task_runner_(main_task_runner),
impl_task_runner_(impl_task_runner),
@@ -84,7 +86,7 @@ Proxy::Proxy(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
#endif
}
-Proxy::~Proxy() {
+TaskRunnerProvider::~TaskRunnerProvider() {
DCHECK(IsMainThread());
}
« no previous file with comments | « cc/trees/task_runner_provider.h ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698