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

Unified Diff: device/bluetooth/dbus/bluetooth_media_client.cc

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/dbus/bluetooth_media_client.cc
diff --git a/chromeos/dbus/bluetooth_media_client.cc b/device/bluetooth/dbus/bluetooth_media_client.cc
similarity index 92%
rename from chromeos/dbus/bluetooth_media_client.cc
rename to device/bluetooth/dbus/bluetooth_media_client.cc
index 592275307695a89a2d97a22bab0aa2df8d0d6aab..0927d459df65dedf822f1f8007cdbf5e3b48d0c8 100644
--- a/chromeos/dbus/bluetooth_media_client.cc
+++ b/device/bluetooth/dbus/bluetooth_media_client.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 "chromeos/dbus/bluetooth_media_client.h"
+#include "device/bluetooth/dbus/bluetooth_media_client.h"
#include "base/bind.h"
#include "base/logging.h"
@@ -18,8 +18,7 @@ namespace {
// Since there is no property associated with Media objects, an empty callback
// is used.
-void DoNothing(const std::string& property_name) {
-}
+void DoNothing(const std::string& property_name) {}
// TODO(mcchou): Add these service constants into dbus/service_constants.h
// later.
@@ -36,7 +35,7 @@ const char kCapabilitiesEndpointProperty[] = "Capabilities";
} // namespace
-namespace chromeos {
+namespace bluez {
// static
const char BluetoothMediaClient::kNoResponseError[] =
@@ -46,14 +45,12 @@ const char BluetoothMediaClient::kNoResponseError[] =
const char BluetoothMediaClient::kBluetoothAudioSinkUUID[] =
"0000110b-0000-1000-8000-00805f9b34fb";
-BluetoothMediaClient::EndpointProperties::EndpointProperties() : codec(0x00) {
-}
+BluetoothMediaClient::EndpointProperties::EndpointProperties() : codec(0x00) {}
-BluetoothMediaClient::EndpointProperties::~EndpointProperties() {
-}
+BluetoothMediaClient::EndpointProperties::~EndpointProperties() {}
-class BluetoothMediaClientImpl
- : public BluetoothMediaClient, dbus::ObjectManager::Interface {
+class BluetoothMediaClientImpl : public BluetoothMediaClient,
+ dbus::ObjectManager::Interface {
public:
BluetoothMediaClientImpl()
: object_manager_(nullptr), weak_ptr_factory_(this) {}
@@ -145,8 +142,7 @@ class BluetoothMediaClientImpl
scoped_refptr<dbus::ObjectProxy> object_proxy(
object_manager_->GetObjectProxy(object_path));
object_proxy->CallMethodWithErrorCallback(
- &method_call,
- dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&BluetoothMediaClientImpl::OnSuccess,
weak_ptr_factory_.GetWeakPtr(), callback),
base::Bind(&BluetoothMediaClientImpl::OnError,
@@ -170,8 +166,7 @@ class BluetoothMediaClientImpl
scoped_refptr<dbus::ObjectProxy> object_proxy(
object_manager_->GetObjectProxy(object_path));
object_proxy->CallMethodWithErrorCallback(
- &method_call,
- dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&BluetoothMediaClientImpl::OnSuccess,
weak_ptr_factory_.GetWeakPtr(), callback),
base::Bind(&BluetoothMediaClientImpl::OnError,
@@ -190,8 +185,7 @@ class BluetoothMediaClientImpl
private:
// Called when a response for successful method call is received.
- void OnSuccess(const base::Closure& callback,
- dbus::Response* response) {
+ void OnSuccess(const base::Closure& callback, dbus::Response* response) {
DCHECK(response);
callback.Run();
}
@@ -222,14 +216,12 @@ class BluetoothMediaClientImpl
DISALLOW_COPY_AND_ASSIGN(BluetoothMediaClientImpl);
};
-BluetoothMediaClient::BluetoothMediaClient() {
-}
+BluetoothMediaClient::BluetoothMediaClient() {}
-BluetoothMediaClient::~BluetoothMediaClient() {
-}
+BluetoothMediaClient::~BluetoothMediaClient() {}
BluetoothMediaClient* BluetoothMediaClient::Create() {
return new BluetoothMediaClientImpl();
}
-} // namespace chromeos
+} // namespace bluez
« no previous file with comments | « device/bluetooth/dbus/bluetooth_media_client.h ('k') | device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698