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

Side by Side Diff: device/bluetooth/bluetooth_device.cc

Issue 2282763004: bluetooth: mac: Improve classic device discovery and update (Closed)
Patch Set: Override getlastupdate and make constexpr Created 4 years, 3 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 (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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698