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

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

Issue 1974633002: Implement DBus changes needed for notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h" 5 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "third_party/cros_system_api/dbus/service_constants.h" 9 #include "third_party/cros_system_api/dbus/service_constants.h"
10 10
(...skipping 16 matching lines...) Expand all
27 const std::vector<dbus::ObjectPath>& includes) 27 const std::vector<dbus::ObjectPath>& includes)
28 : origin_thread_id_(base::PlatformThread::CurrentId()), 28 : origin_thread_id_(base::PlatformThread::CurrentId()),
29 uuid_(uuid), 29 uuid_(uuid),
30 is_primary_(is_primary), 30 is_primary_(is_primary),
31 includes_(includes), 31 includes_(includes),
32 bus_(bus), 32 bus_(bus),
33 object_path_(object_path), 33 object_path_(object_path),
34 weak_ptr_factory_(this) { 34 weak_ptr_factory_(this) {
35 VLOG(1) << "Creating Bluetooth GATT service: " << object_path_.value() 35 VLOG(1) << "Creating Bluetooth GATT service: " << object_path_.value()
36 << " UUID: " << uuid; 36 << " UUID: " << uuid;
37
38 // If we have a null bus, this means that this is being initialized for a
39 // test, hence we shouldn't do any other setup.
40 if (!bus_) 37 if (!bus_)
41 return; 38 return;
42 39
43 DCHECK(!uuid_.empty()); 40 DCHECK(!uuid_.empty());
44 DCHECK(object_path_.IsValid()); 41 DCHECK(object_path_.IsValid());
45 42
46 exported_object_ = bus_->GetExportedObject(object_path_); 43 exported_object_ = bus_->GetExportedObject(object_path_);
47 44
48 exported_object_->ExportMethod( 45 exported_object_->ExportMethod(
49 dbus::kDBusPropertiesInterface, dbus::kDBusPropertiesGet, 46 dbus::kDBusPropertiesInterface, dbus::kDBusPropertiesGet,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 LOG_IF(WARNING, !success) << "Failed to export " << interface_name << "." 221 LOG_IF(WARNING, !success) << "Failed to export " << interface_name << "."
225 << method_name; 222 << method_name;
226 } 223 }
227 224
228 const dbus::ObjectPath& BluetoothGattServiceServiceProviderImpl::object_path() 225 const dbus::ObjectPath& BluetoothGattServiceServiceProviderImpl::object_path()
229 const { 226 const {
230 return object_path_; 227 return object_path_;
231 } 228 }
232 229
233 } // namespace bluez 230 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698