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

Unified Diff: device/bluetooth/bluetooth_adapter_profile_bluez.cc

Issue 1415573014: Reland "Add Linux support for the Bluetooth API" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_adapter_profile_bluez.cc
diff --git a/device/bluetooth/bluetooth_adapter_profile_chromeos.cc b/device/bluetooth/bluetooth_adapter_profile_bluez.cc
similarity index 83%
rename from device/bluetooth/bluetooth_adapter_profile_chromeos.cc
rename to device/bluetooth/bluetooth_adapter_profile_bluez.cc
index 27779f287fadc80e6301710e3cc894588664ebd2..845002bf655aa00f8af84f6efdab48636e931d8a 100644
--- a/device/bluetooth/bluetooth_adapter_profile_chromeos.cc
+++ b/device/bluetooth/bluetooth_adapter_profile_bluez.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "device/bluetooth/bluetooth_adapter_profile_chromeos.h"
+#include "device/bluetooth/bluetooth_adapter_profile_bluez.h"
#include <string>
@@ -11,21 +11,21 @@
#include "base/strings/string_util.h"
#include "dbus/bus.h"
#include "dbus/object_path.h"
-#include "device/bluetooth/bluetooth_adapter_chromeos.h"
+#include "device/bluetooth/bluetooth_adapter_bluez.h"
#include "device/bluetooth/bluetooth_uuid.h"
#include "device/bluetooth/dbus/bluetooth_profile_service_provider.h"
#include "device/bluetooth/dbus/bluez_dbus_manager.h"
-namespace chromeos {
+namespace bluez {
// static
-void BluetoothAdapterProfileChromeOS::Register(
+void BluetoothAdapterProfileBlueZ::Register(
const device::BluetoothUUID& uuid,
const bluez::BluetoothProfileManagerClient::Options& options,
const ProfileRegisteredCallback& success_callback,
const bluez::BluetoothProfileManagerClient::ErrorCallback& error_callback) {
- scoped_ptr<BluetoothAdapterProfileChromeOS> profile(
- new BluetoothAdapterProfileChromeOS(uuid));
+ scoped_ptr<BluetoothAdapterProfileBlueZ> profile(
+ new BluetoothAdapterProfileBlueZ(uuid));
VLOG(1) << "Registering profile: " << profile->object_path().value();
const dbus::ObjectPath& object_path = profile->object_path();
@@ -36,7 +36,7 @@ void BluetoothAdapterProfileChromeOS::Register(
error_callback);
}
-BluetoothAdapterProfileChromeOS::BluetoothAdapterProfileChromeOS(
+BluetoothAdapterProfileBlueZ::BluetoothAdapterProfileBlueZ(
const device::BluetoothUUID& uuid)
: uuid_(uuid), weak_ptr_factory_(this) {
std::string uuid_path;
@@ -50,10 +50,9 @@ BluetoothAdapterProfileChromeOS::BluetoothAdapterProfileChromeOS(
DCHECK(profile_.get());
}
-BluetoothAdapterProfileChromeOS::~BluetoothAdapterProfileChromeOS() {
-}
+BluetoothAdapterProfileBlueZ::~BluetoothAdapterProfileBlueZ() {}
-bool BluetoothAdapterProfileChromeOS::SetDelegate(
+bool BluetoothAdapterProfileBlueZ::SetDelegate(
const dbus::ObjectPath& device_path,
bluez::BluetoothProfileServiceProvider::Delegate* delegate) {
DCHECK(delegate);
@@ -68,7 +67,7 @@ bool BluetoothAdapterProfileChromeOS::SetDelegate(
return true;
}
-void BluetoothAdapterProfileChromeOS::RemoveDelegate(
+void BluetoothAdapterProfileBlueZ::RemoveDelegate(
const dbus::ObjectPath& device_path,
const base::Closure& unregistered_callback) {
VLOG(1) << object_path_.value() << " dev " << device_path.value()
@@ -89,11 +88,11 @@ void BluetoothAdapterProfileChromeOS::RemoveDelegate(
->GetBluetoothProfileManagerClient()
->UnregisterProfile(
object_path_, unregistered_callback,
- base::Bind(&BluetoothAdapterProfileChromeOS::OnUnregisterProfileError,
+ base::Bind(&BluetoothAdapterProfileBlueZ::OnUnregisterProfileError,
weak_ptr_factory_.GetWeakPtr(), unregistered_callback));
}
-void BluetoothAdapterProfileChromeOS::OnUnregisterProfileError(
+void BluetoothAdapterProfileBlueZ::OnUnregisterProfileError(
const base::Closure& unregistered_callback,
const std::string& error_name,
const std::string& error_message) {
@@ -105,11 +104,11 @@ void BluetoothAdapterProfileChromeOS::OnUnregisterProfileError(
}
// bluez::BluetoothProfileServiceProvider::Delegate:
-void BluetoothAdapterProfileChromeOS::Released() {
+void BluetoothAdapterProfileBlueZ::Released() {
VLOG(1) << object_path_.value() << ": Release";
}
-void BluetoothAdapterProfileChromeOS::NewConnection(
+void BluetoothAdapterProfileBlueZ::NewConnection(
const dbus::ObjectPath& device_path,
scoped_ptr<dbus::FileDescriptor> fd,
const bluez::BluetoothProfileServiceProvider::Delegate::Options& options,
@@ -130,7 +129,7 @@ void BluetoothAdapterProfileChromeOS::NewConnection(
options, callback);
}
-void BluetoothAdapterProfileChromeOS::RequestDisconnection(
+void BluetoothAdapterProfileBlueZ::RequestDisconnection(
const dbus::ObjectPath& device_path,
const ConfirmationCallback& callback) {
dbus::ObjectPath delegate_path = device_path;
@@ -148,7 +147,7 @@ void BluetoothAdapterProfileChromeOS::RequestDisconnection(
callback);
}
-void BluetoothAdapterProfileChromeOS::Cancel() {
+void BluetoothAdapterProfileBlueZ::Cancel() {
// Cancel() should only go to a delegate accepting connections.
if (delegates_.find("") == delegates_.end()) {
VLOG(1) << object_path_.value() << ": Cancel with no delegate!";
@@ -158,4 +157,4 @@ void BluetoothAdapterProfileChromeOS::Cancel() {
delegates_[""]->Cancel();
}
-} // namespace chromeos
+} // namespace bluez

Powered by Google App Engine
This is Rietveld 408576698