diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/message_loop_proxy_impl.cc | 2 | ||||
-rw-r--r-- | base/message_loop_unittest.cc | 8 | ||||
-rw-r--r-- | base/metrics/field_trial_unittest.cc | 2 | ||||
-rw-r--r-- | base/ref_counted_unittest.cc | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/base/message_loop_proxy_impl.cc b/base/message_loop_proxy_impl.cc index 761cc71..2e0f809 100644 --- a/base/message_loop_proxy_impl.cc +++ b/base/message_loop_proxy_impl.cc @@ -93,7 +93,7 @@ void MessageLoopProxyImpl::WillDestroyCurrentMessageLoop() { scoped_refptr<MessageLoopProxy> MessageLoopProxy::CreateForCurrentThread() { - scoped_refptr<MessageLoopProxy> ret = new MessageLoopProxyImpl(); + scoped_refptr<MessageLoopProxy> ret(new MessageLoopProxyImpl()); return ret; } diff --git a/base/message_loop_unittest.cc b/base/message_loop_unittest.cc index 8cce8ea..a3c3307 100644 --- a/base/message_loop_unittest.cc +++ b/base/message_loop_unittest.cc @@ -95,7 +95,7 @@ void RunTest_PostTask(MessageLoop::Type message_loop_type) { MessageLoop loop(message_loop_type); // Add tests to message loop - scoped_refptr<Foo> foo = new Foo(); + scoped_refptr<Foo> foo(new Foo()); std::string a("a"), b("b"), c("c"), d("d"); MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( foo.get(), &Foo::Test0)); @@ -111,7 +111,7 @@ void RunTest_PostTask(MessageLoop::Type message_loop_type) { foo.get(), &Foo::Test2Mixed, a, &d)); // After all tests, post a message that will shut down the message loop - scoped_refptr<QuitMsgLoop> quit = new QuitMsgLoop(); + scoped_refptr<QuitMsgLoop> quit(new QuitMsgLoop()); MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( quit.get(), &QuitMsgLoop::QuitNow)); @@ -126,7 +126,7 @@ void RunTest_PostTask_SEH(MessageLoop::Type message_loop_type) { MessageLoop loop(message_loop_type); // Add tests to message loop - scoped_refptr<Foo> foo = new Foo(); + scoped_refptr<Foo> foo(new Foo()); std::string a("a"), b("b"), c("c"), d("d"); MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( foo.get(), &Foo::Test0)); @@ -142,7 +142,7 @@ void RunTest_PostTask_SEH(MessageLoop::Type message_loop_type) { foo.get(), &Foo::Test2Mixed, a, &d)); // After all tests, post a message that will shut down the message loop - scoped_refptr<QuitMsgLoop> quit = new QuitMsgLoop(); + scoped_refptr<QuitMsgLoop> quit(new QuitMsgLoop()); MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( quit.get(), &QuitMsgLoop::QuitNow)); diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc index aea8e85..a8138bb 100644 --- a/base/metrics/field_trial_unittest.cc +++ b/base/metrics/field_trial_unittest.cc @@ -100,7 +100,7 @@ TEST_F(FieldTrialTest, FiftyFiftyProbability) { int counter = 0; do { std::string name = base::StringPrintf("FiftyFifty%d", ++counter); - scoped_refptr<FieldTrial> trial = new FieldTrial(name, 2); + scoped_refptr<FieldTrial> trial(new FieldTrial(name, 2)); trial->AppendGroup("first", 1); // 50% chance of being chosen. if (trial->group() != FieldTrial::kNotParticipating) { first_winner = true; diff --git a/base/ref_counted_unittest.cc b/base/ref_counted_unittest.cc index f2739fce..cd6f922 100644 --- a/base/ref_counted_unittest.cc +++ b/base/ref_counted_unittest.cc @@ -26,7 +26,7 @@ class CheckDerivedMemberAccess : public scoped_refptr<SelfAssign> { TEST(RefCountedUnitTest, TestSelfAssignment) { SelfAssign* p = new SelfAssign; - scoped_refptr<SelfAssign> var = p; + scoped_refptr<SelfAssign> var(p); var = var; EXPECT_EQ(var.get(), p); } |