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

Unified Diff: services/shell/public/cpp/lib/shell_connection_ref.cc

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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 | « services/shell/public/cpp/lib/shell_connection.cc ('k') | services/shell/public/cpp/lib/shell_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/shell_connection_ref.cc
diff --git a/services/shell/public/cpp/lib/shell_connection_ref.cc b/services/shell/public/cpp/lib/shell_connection_ref.cc
index 8b06bb79a4e9d39c0a8f9b982544c0999a390ed4..388c028f4aee029e73560d779385f064dc51dd16 100644
--- a/services/shell/public/cpp/lib/shell_connection_ref.cc
+++ b/services/shell/public/cpp/lib/shell_connection_ref.cc
@@ -16,9 +16,9 @@ class ShellConnectionRefImpl : public ShellConnectionRef {
public:
ShellConnectionRefImpl(
base::WeakPtr<ShellConnectionRefFactory> factory,
- scoped_refptr<base::SingleThreadTaskRunner> shell_client_task_runner)
+ scoped_refptr<base::SingleThreadTaskRunner> service_task_runner)
: factory_(factory),
- shell_client_task_runner_(shell_client_task_runner) {
+ service_task_runner_(service_task_runner) {
// This object is not thread-safe but may be used exclusively on a different
// thread from the one which constructed it.
thread_checker_.DetachFromThread();
@@ -27,10 +27,10 @@ class ShellConnectionRefImpl : public ShellConnectionRef {
~ShellConnectionRefImpl() override {
DCHECK(thread_checker_.CalledOnValidThread());
- if (shell_client_task_runner_->BelongsToCurrentThread() && factory_) {
+ if (service_task_runner_->BelongsToCurrentThread() && factory_) {
factory_->Release();
} else {
- shell_client_task_runner_->PostTask(
+ service_task_runner_->PostTask(
FROM_HERE,
base::Bind(&ShellConnectionRefFactory::Release, factory_));
}
@@ -41,20 +41,20 @@ class ShellConnectionRefImpl : public ShellConnectionRef {
std::unique_ptr<ShellConnectionRef> Clone() override {
DCHECK(thread_checker_.CalledOnValidThread());
- if (shell_client_task_runner_->BelongsToCurrentThread() && factory_) {
+ if (service_task_runner_->BelongsToCurrentThread() && factory_) {
factory_->AddRef();
} else {
- shell_client_task_runner_->PostTask(
+ service_task_runner_->PostTask(
FROM_HERE,
base::Bind(&ShellConnectionRefFactory::AddRef, factory_));
}
return base::WrapUnique(
- new ShellConnectionRefImpl(factory_, shell_client_task_runner_));
+ new ShellConnectionRefImpl(factory_, service_task_runner_));
}
base::WeakPtr<ShellConnectionRefFactory> factory_;
- scoped_refptr<base::SingleThreadTaskRunner> shell_client_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> service_task_runner_;
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(ShellConnectionRefImpl);
« no previous file with comments | « services/shell/public/cpp/lib/shell_connection.cc ('k') | services/shell/public/cpp/lib/shell_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698