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

Side by Side Diff: device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.cc

Issue 2390063002: Roll cros_system_api and use constants pulled in. (Closed)
Patch Set: 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
« no previous file with comments | « device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/location.h" 5 #include "base/location.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "dbus/bus.h" 9 #include "dbus/bus.h"
10 #include "dbus/message.h" 10 #include "dbus/message.h"
11 #include "dbus/object_proxy.h" 11 #include "dbus/object_proxy.h"
12 #include "device/bluetooth/dbus/fake_bluetooth_le_advertisement_service_provider .h" 12 #include "device/bluetooth/dbus/fake_bluetooth_le_advertisement_service_provider .h"
13 #include "device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h" 13 #include "device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h"
14 #include "third_party/cros_system_api/dbus/service_constants.h" 14 #include "third_party/cros_system_api/dbus/service_constants.h"
15 15
16 namespace bluez { 16 namespace bluez {
17 17
18 namespace { 18 namespace {
19 19
20 constexpr char kAdvertisingManagerPath[] = "/fake/hci0"; 20 constexpr char kAdvertisingManagerPath[] = "/fake/hci0";
21 // According to the Bluetooth spec, these are the min and max values possible
22 // for advertising interval. Core 4.2 Spec, Vol 2, Part E, Section 7.8.5.
21 constexpr uint16_t kMinIntervalMs = 20; 23 constexpr uint16_t kMinIntervalMs = 20;
22 constexpr uint16_t kMaxIntervalMs = 10240; 24 constexpr uint16_t kMaxIntervalMs = 10240;
23 25
24 } // namespace 26 } // namespace
25 27
26 FakeBluetoothLEAdvertisingManagerClient:: 28 FakeBluetoothLEAdvertisingManagerClient::
27 FakeBluetoothLEAdvertisingManagerClient() {} 29 FakeBluetoothLEAdvertisingManagerClient() {}
28 30
29 FakeBluetoothLEAdvertisingManagerClient:: 31 FakeBluetoothLEAdvertisingManagerClient::
30 ~FakeBluetoothLEAdvertisingManagerClient() {} 32 ~FakeBluetoothLEAdvertisingManagerClient() {}
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void FakeBluetoothLEAdvertisingManagerClient:: 114 void FakeBluetoothLEAdvertisingManagerClient::
113 UnregisterAdvertisementServiceProvider( 115 UnregisterAdvertisementServiceProvider(
114 FakeBluetoothLEAdvertisementServiceProvider* service_provider) { 116 FakeBluetoothLEAdvertisementServiceProvider* service_provider) {
115 ServiceProviderMap::iterator iter = 117 ServiceProviderMap::iterator iter =
116 service_provider_map_.find(service_provider->object_path_); 118 service_provider_map_.find(service_provider->object_path_);
117 if (iter != service_provider_map_.end() && iter->second == service_provider) 119 if (iter != service_provider_map_.end() && iter->second == service_provider)
118 service_provider_map_.erase(iter); 120 service_provider_map_.erase(iter);
119 } 121 }
120 122
121 } // namespace bluez 123 } // namespace bluez
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698