| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bluetooth_device.h" | 5 #include "device/bluetooth/bluetooth_device.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 void BluetoothDevice::Pair(PairingDelegate* pairing_delegate, | 472 void BluetoothDevice::Pair(PairingDelegate* pairing_delegate, |
| 473 const base::Closure& callback, | 473 const base::Closure& callback, |
| 474 const ConnectErrorCallback& error_callback) { | 474 const ConnectErrorCallback& error_callback) { |
| 475 NOTREACHED(); | 475 NOTREACHED(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void BluetoothDevice::UpdateTimestamp() { | 478 void BluetoothDevice::UpdateTimestamp() { |
| 479 last_update_time_ = base::Time::NowFromSystemTime(); | 479 last_update_time_ = base::Time::NowFromSystemTime(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 base::Time BluetoothDevice::GetLastUpdateTime() const { |
| 483 return last_update_time_; |
| 484 } |
| 485 |
| 482 // static | 486 // static |
| 483 int8_t BluetoothDevice::ClampPower(int power) { | 487 int8_t BluetoothDevice::ClampPower(int power) { |
| 484 if (power < INT8_MIN) { | 488 if (power < INT8_MIN) { |
| 485 return INT8_MIN; | 489 return INT8_MIN; |
| 486 } | 490 } |
| 487 if (power > INT8_MAX) { | 491 if (power > INT8_MAX) { |
| 488 return INT8_MAX; | 492 return INT8_MAX; |
| 489 } | 493 } |
| 490 return static_cast<int8_t>(power); | 494 return static_cast<int8_t>(power); |
| 491 } | 495 } |
| 492 | 496 |
| 493 } // namespace device | 497 } // namespace device |
| OLD | NEW |