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

Side by Side Diff: device/bluetooth/test/bluetooth_gatt_server_test.cc

Issue 2254833003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "device/bluetooth/test/bluetooth_gatt_server_test.h" 5 #include "device/bluetooth/test/bluetooth_gatt_server_test.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "device/bluetooth/bluetooth_uuid.h" 10 #include "device/bluetooth/bluetooth_uuid.h"
(...skipping 14 matching lines...) Expand all
25 25
26 void BluetoothGattServerTest::CompleteGattSetup() { 26 void BluetoothGattServerTest::CompleteGattSetup() {
27 service_->Register(GetCallback(Call::EXPECTED), 27 service_->Register(GetCallback(Call::EXPECTED),
28 GetGattErrorCallback(Call::NOT_EXPECTED)); 28 GetGattErrorCallback(Call::NOT_EXPECTED));
29 } 29 }
30 30
31 void BluetoothGattServerTest::SetUp() { 31 void BluetoothGattServerTest::SetUp() {
32 BluetoothTest::SetUp(); 32 BluetoothTest::SetUp();
33 last_read_value_ = std::vector<uint8_t>(); 33 last_read_value_ = std::vector<uint8_t>();
34 InitWithFakeAdapter(); 34 InitWithFakeAdapter();
35 delegate_ = base::WrapUnique(new TestBluetoothLocalGattServiceDelegate()); 35 delegate_ = base::MakeUnique<TestBluetoothLocalGattServiceDelegate>();
36 } 36 }
37 37
38 void BluetoothGattServerTest::TearDown() { 38 void BluetoothGattServerTest::TearDown() {
39 if (service_.get()) 39 if (service_.get())
40 service_->Delete(); 40 service_->Delete();
41 delegate_.reset(); 41 delegate_.reset();
42 BluetoothTest::TearDown(); 42 BluetoothTest::TearDown();
43 } 43 }
44 44
45 // static 45 // static
(...skipping 15 matching lines...) Expand all
61 CHECK_LE(int_value, 0xFFFFFFFFul); 61 CHECK_LE(int_value, 0xFFFFFFFFul);
62 std::vector<uint8_t> value; 62 std::vector<uint8_t> value;
63 while (int_value) { 63 while (int_value) {
64 value.push_back(int_value & 0xff); 64 value.push_back(int_value & 0xff);
65 int_value >>= 8; 65 int_value >>= 8;
66 } 66 }
67 return value; 67 return value;
68 } 68 }
69 69
70 } // namespace device 70 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc ('k') | device/bluetooth/test/bluetooth_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698