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

Unified Diff: remoting/base/auto_thread.cc

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « jingle/glue/pseudotcp_adapter_unittest.cc ('k') | remoting/base/compound_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/auto_thread.cc
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc
index 9890bc39ecaaa8bff1981880218a55de2337e70b..b1d02790e4f655b0bfd8a531c54723b570d83eef 100644
--- a/remoting/base/auto_thread.cc
+++ b/remoting/base/auto_thread.cc
@@ -57,9 +57,9 @@ scoped_refptr<AutoThreadTaskRunner> AutoThread::CreateWithType(
const char* name,
scoped_refptr<AutoThreadTaskRunner> joiner,
base::MessageLoop::Type type) {
- AutoThread* thread = new AutoThread(name, joiner);
+ AutoThread* thread = new AutoThread(name, joiner.get());
scoped_refptr<AutoThreadTaskRunner> task_runner = thread->StartWithType(type);
- if (!task_runner)
+ if (!task_runner.get())
delete thread;
return task_runner;
}
@@ -167,9 +167,10 @@ void AutoThread::QuitThread(
base::MessageLoop::current()->Quit();
was_quit_properly_ = true;
- if (joiner_) {
- joiner_->PostTask(FROM_HERE, base::Bind(&AutoThread::JoinAndDeleteThread,
- base::Unretained(this)));
+ if (joiner_.get()) {
+ joiner_->PostTask(
+ FROM_HERE,
+ base::Bind(&AutoThread::JoinAndDeleteThread, base::Unretained(this)));
}
}
« no previous file with comments | « jingle/glue/pseudotcp_adapter_unittest.cc ('k') | remoting/base/compound_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698