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

Side by Side Diff: chromeos/binder/service_manager_proxy_unittest.cc

Issue 2255093003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/binder/service_manager_proxy.h" 5 #include "chromeos/binder/service_manager_proxy.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 TEST_F(BinderServiceManagerProxyTest, AddAndCheck) { 53 TEST_F(BinderServiceManagerProxyTest, AddAndCheck) {
54 const base::string16 kServiceName = 54 const base::string16 kServiceName =
55 base::ASCIIToUTF16("org.chromium.TestService-" + base::GenerateGUID()); 55 base::ASCIIToUTF16("org.chromium.TestService-" + base::GenerateGUID());
56 56
57 // Service not available yet. 57 // Service not available yet.
58 EXPECT_FALSE( 58 EXPECT_FALSE(
59 ServiceManagerProxy::CheckService(&command_broker_, kServiceName)); 59 ServiceManagerProxy::CheckService(&command_broker_, kServiceName));
60 60
61 // Add service. 61 // Add service.
62 scoped_refptr<Object> object( 62 scoped_refptr<Object> object(
63 new LocalObject(base::WrapUnique(new DummyTransactionHandler()))); 63 new LocalObject(base::MakeUnique<DummyTransactionHandler>()));
64 EXPECT_TRUE(ServiceManagerProxy::AddService(&command_broker_, kServiceName, 64 EXPECT_TRUE(ServiceManagerProxy::AddService(&command_broker_, kServiceName,
65 object, 0)); 65 object, 0));
66 66
67 // Service is available. 67 // Service is available.
68 scoped_refptr<Object> result = 68 scoped_refptr<Object> result =
69 ServiceManagerProxy::CheckService(&command_broker_, kServiceName); 69 ServiceManagerProxy::CheckService(&command_broker_, kServiceName);
70 ASSERT_TRUE(result); 70 ASSERT_TRUE(result);
71 ASSERT_EQ(LocalObject::TYPE_LOCAL, result->GetType()); 71 ASSERT_EQ(LocalObject::TYPE_LOCAL, result->GetType());
72 EXPECT_EQ(object.get(), result.get()); 72 EXPECT_EQ(object.get(), result.get());
73 } 73 }
74 74
75 } // namespace binder 75 } // namespace binder
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698