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

Side by Side Diff: components/proximity_auth/ble/bluetooth_low_energy_connection.cc

Issue 1728033002: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 "components/proximity_auth/ble/bluetooth_low_energy_connection.h" 5 #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 } 312 }
313 313
314 BluetoothLowEnergyConnection::WriteRequest::WriteRequest( 314 BluetoothLowEnergyConnection::WriteRequest::WriteRequest(
315 const std::vector<uint8_t>& val, 315 const std::vector<uint8_t>& val,
316 bool flag) 316 bool flag)
317 : value(val), 317 : value(val),
318 is_last_write_for_wire_message(flag), 318 is_last_write_for_wire_message(flag),
319 number_of_failed_attempts(0) {} 319 number_of_failed_attempts(0) {}
320 320
321 BluetoothLowEnergyConnection::WriteRequest::WriteRequest(
322 const WriteRequest& other) = default;
323
321 BluetoothLowEnergyConnection::WriteRequest::~WriteRequest() {} 324 BluetoothLowEnergyConnection::WriteRequest::~WriteRequest() {}
322 325
323 void BluetoothLowEnergyConnection::CompleteConnection() { 326 void BluetoothLowEnergyConnection::CompleteConnection() {
324 PA_LOG(INFO) << "Connection completed. Time elapsed: " 327 PA_LOG(INFO) << "Connection completed. Time elapsed: "
325 << base::TimeTicks::Now() - start_time_; 328 << base::TimeTicks::Now() - start_time_;
326 SetSubStatus(SubStatus::CONNECTED); 329 SetSubStatus(SubStatus::CONNECTED);
327 } 330 }
328 331
329 void BluetoothLowEnergyConnection::OnCreateGattConnectionError( 332 void BluetoothLowEnergyConnection::OnCreateGattConnectionError(
330 device::BluetoothDevice::ConnectErrorCode error_code) { 333 device::BluetoothDevice::ConnectErrorCode error_code) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 const uint32_t value) { 609 const uint32_t value) {
607 std::vector<uint8_t> bytes(4, 0); 610 std::vector<uint8_t> bytes(4, 0);
608 bytes[0] = static_cast<uint8_t>(value); 611 bytes[0] = static_cast<uint8_t>(value);
609 bytes[1] = static_cast<uint8_t>(value >> 8); 612 bytes[1] = static_cast<uint8_t>(value >> 8);
610 bytes[2] = static_cast<uint8_t>(value >> 16); 613 bytes[2] = static_cast<uint8_t>(value >> 16);
611 bytes[3] = static_cast<uint8_t>(value >> 24); 614 bytes[3] = static_cast<uint8_t>(value >> 24);
612 return bytes; 615 return bytes;
613 } 616 }
614 617
615 } // namespace proximity_auth 618 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698