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

Side by Side Diff: components/arc/bluetooth/arc_bluetooth_bridge.h

Issue 2438373002: arc: bluetooth: Set advertisement max slot to 1 (Closed)
Patch Set: remove unit test Created 4 years, 2 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 #ifndef COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 5 #ifndef COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
6 #define COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 6 #define COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // 465 //
466 // When a handle is reserved, an entry is placed into the advertisements_ 466 // When a handle is reserved, an entry is placed into the advertisements_
467 // map. This entry is not yet associated with a device::BluetoothAdvertisement 467 // map. This entry is not yet associated with a device::BluetoothAdvertisement
468 // because the instance hasn't sent us any advertising data yet, so its 468 // because the instance hasn't sent us any advertising data yet, so its
469 // mapped value is nullptr until that happens. Thus we have three states for a 469 // mapped value is nullptr until that happens. Thus we have three states for a
470 // handle: 470 // handle:
471 // * unmapped -> free 471 // * unmapped -> free
472 // * mapped to nullptr -> reserved, awaiting data 472 // * mapped to nullptr -> reserved, awaiting data
473 // * mapped to a device::BluetoothAdvertisement -> in use, and the mapped 473 // * mapped to a device::BluetoothAdvertisement -> in use, and the mapped
474 // BluetoothAdvertisement is currently registered with the adapter. 474 // BluetoothAdvertisement is currently registered with the adapter.
475 enum { kMaxAdvertisements = 5 }; 475 // TODO(crbug.com/658385) Change back to 5 when we support setting signal
476 // strength per each advertisement slot.
477 enum { kMaxAdvertisements = 1 };
476 std::map<int32_t, scoped_refptr<device::BluetoothAdvertisement>> 478 std::map<int32_t, scoped_refptr<device::BluetoothAdvertisement>>
477 advertisements_; 479 advertisements_;
478 480
479 base::ThreadChecker thread_checker_; 481 base::ThreadChecker thread_checker_;
480 482
481 // WeakPtrFactory to use for callbacks. 483 // WeakPtrFactory to use for callbacks.
482 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_; 484 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_;
483 485
484 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge); 486 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge);
485 }; 487 };
486 488
487 } // namespace arc 489 } // namespace arc
488 490
489 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 491 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698