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

Unified Diff: tools/battor_agent/battor_connection_impl_unittest.cc

Issue 2254873004: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/battor_agent/battor_connection_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/battor_agent/battor_connection_impl_unittest.cc
diff --git a/tools/battor_agent/battor_connection_impl_unittest.cc b/tools/battor_agent/battor_connection_impl_unittest.cc
index a9027942d8b91a76f77724bd195dc21a4c53a114..d77ff7d957d99ffbeb384f00f966b94605bf7a82 100644
--- a/tools/battor_agent/battor_connection_impl_unittest.cc
+++ b/tools/battor_agent/battor_connection_impl_unittest.cc
@@ -78,9 +78,8 @@ class BattOrConnectionImplTest : public testing::Test,
scoped_refptr<net::IOBuffer> buffer(
new net::IOBuffer((size_t)bytes_to_read));
- connection_->GetIoHandler()->Read(
- base::WrapUnique(new device::ReceiveBuffer(
- buffer, bytes_to_read, base::Bind(&NullReadCallback))));
+ connection_->GetIoHandler()->Read(base::MakeUnique<device::ReceiveBuffer>(
+ buffer, bytes_to_read, base::Bind(&NullReadCallback)));
task_runner_->RunUntilIdle();
return buffer;
@@ -98,8 +97,8 @@ class BattOrConnectionImplTest : public testing::Test,
// Writes the specified bytes directly to the serial connection.
void SendBytesRaw(const char* data, uint16_t bytes_to_send) {
std::vector<char> data_vector(data, data + bytes_to_send);
- connection_->GetIoHandler()->Write(base::WrapUnique(
- new device::SendBuffer(data_vector, base::Bind(&NullWriteCallback))));
+ connection_->GetIoHandler()->Write(base::MakeUnique<device::SendBuffer>(
+ data_vector, base::Bind(&NullWriteCallback)));
task_runner_->RunUntilIdle();
}
« no previous file with comments | « tools/battor_agent/battor_connection_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698