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

Unified Diff: base/message_loop/message_loop_test.cc

Issue 2283003002: Remove unneeded scoped_refptr<>::get on method bind (Closed)
Patch Set: update 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 | « no previous file | base/message_loop/message_loop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop_test.cc
diff --git a/base/message_loop/message_loop_test.cc b/base/message_loop/message_loop_test.cc
index 1ab946f9e242a8eb0928cd89bd0dbbf33e758eea..4a690c0e6632445254a2a291d9b8cdbf4d4c87e4 100644
--- a/base/message_loop/message_loop_test.cc
+++ b/base/message_loop/message_loop_test.cc
@@ -98,17 +98,17 @@ void RunTest_PostTask(MessagePumpFactory factory) {
scoped_refptr<Foo> foo(new Foo());
std::string a("a"), b("b"), c("c"), d("d");
MessageLoop::current()->task_runner()->PostTask(FROM_HERE,
- Bind(&Foo::Test0, foo.get()));
+ Bind(&Foo::Test0, foo));
MessageLoop::current()->task_runner()->PostTask(
- FROM_HERE, Bind(&Foo::Test1ConstRef, foo.get(), a));
+ FROM_HERE, Bind(&Foo::Test1ConstRef, foo, a));
MessageLoop::current()->task_runner()->PostTask(
- FROM_HERE, Bind(&Foo::Test1Ptr, foo.get(), &b));
+ FROM_HERE, Bind(&Foo::Test1Ptr, foo, &b));
MessageLoop::current()->task_runner()->PostTask(
- FROM_HERE, Bind(&Foo::Test1Int, foo.get(), 100));
+ FROM_HERE, Bind(&Foo::Test1Int, foo, 100));
MessageLoop::current()->task_runner()->PostTask(
- FROM_HERE, Bind(&Foo::Test2Ptr, foo.get(), &a, &c));
+ FROM_HERE, Bind(&Foo::Test2Ptr, foo, &a, &c));
MessageLoop::current()->task_runner()->PostTask(
- FROM_HERE, Bind(&Foo::Test2Mixed, foo.get(), a, &d));
+ FROM_HERE, Bind(&Foo::Test2Mixed, foo, a, &d));
// After all tests, post a message that will shut down the message loop
MessageLoop::current()->task_runner()->PostTask(
FROM_HERE,
@@ -303,7 +303,7 @@ class RecordDeletionProbe : public RefCounted<RecordDeletionProbe> {
*was_deleted_ = true;
if (post_on_delete_.get())
MessageLoop::current()->task_runner()->PostTask(
- FROM_HERE, Bind(&RecordDeletionProbe::Run, post_on_delete_.get()));
+ FROM_HERE, Bind(&RecordDeletionProbe::Run, post_on_delete_));
}
scoped_refptr<RecordDeletionProbe> post_on_delete_;
« no previous file with comments | « no previous file | base/message_loop/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698