| OLD | NEW |
| 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/bluez/bluetooth_service_attribute_value_bluez.h" | 5 #include "device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 | 11 |
| 12 namespace bluez { | 12 namespace bluez { |
| 13 | 13 |
| 14 BluetoothServiceAttributeValueBlueZ::BluetoothServiceAttributeValueBlueZ() | 14 BluetoothServiceAttributeValueBlueZ::BluetoothServiceAttributeValueBlueZ() |
| 15 : type_(NULLTYPE), size_(0), value_(base::Value::CreateNullValue()) {} | 15 : type_(NULLTYPE), size_(0), value_(base::MakeUnique<base::Value>()) {} |
| 16 | 16 |
| 17 BluetoothServiceAttributeValueBlueZ::BluetoothServiceAttributeValueBlueZ( | 17 BluetoothServiceAttributeValueBlueZ::BluetoothServiceAttributeValueBlueZ( |
| 18 Type type, | 18 Type type, |
| 19 size_t size, | 19 size_t size, |
| 20 std::unique_ptr<base::Value> value) | 20 std::unique_ptr<base::Value> value) |
| 21 : type_(type), size_(size), value_(std::move(value)) { | 21 : type_(type), size_(size), value_(std::move(value)) { |
| 22 CHECK_NE(type, SEQUENCE); | 22 CHECK_NE(type, SEQUENCE); |
| 23 } | 23 } |
| 24 | 24 |
| 25 BluetoothServiceAttributeValueBlueZ::BluetoothServiceAttributeValueBlueZ( | 25 BluetoothServiceAttributeValueBlueZ::BluetoothServiceAttributeValueBlueZ( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 45 value_ = attribute.value_->CreateDeepCopy(); | 45 value_ = attribute.value_->CreateDeepCopy(); |
| 46 sequence_ = nullptr; | 46 sequence_ = nullptr; |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 return *this; | 49 return *this; |
| 50 } | 50 } |
| 51 | 51 |
| 52 BluetoothServiceAttributeValueBlueZ::~BluetoothServiceAttributeValueBlueZ() {} | 52 BluetoothServiceAttributeValueBlueZ::~BluetoothServiceAttributeValueBlueZ() {} |
| 53 | 53 |
| 54 } // namespace bluez | 54 } // namespace bluez |
| OLD | NEW |