Commit 591db952 authored by benchan@chromium.org's avatar benchan@chromium.org

Minor clean up in DBusClient, DBusThreadManager, and FakeDBusThreadManager code.

BUG=None

Review URL: https://codereview.chromium.org/412433007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285068 0039d316-1c4b-4281-b951-d872f2087c98
parent c7990dbf
......@@ -9,7 +9,7 @@
namespace dbus {
class Bus;
};
} // namespace dbus
namespace chromeos {
......
......@@ -4,8 +4,6 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include <map>
#include "base/command_line.h"
#include "base/observer_list.h"
#include "base/sys_info.h"
......@@ -257,7 +255,7 @@ class DBusClientBundle {
// The DBusThreadManager implementation used in production.
class DBusThreadManagerImpl : public DBusThreadManager {
public:
explicit DBusThreadManagerImpl() {
DBusThreadManagerImpl() {
// Create the D-Bus thread.
base::Thread::Options thread_options;
thread_options.message_loop_type = base::MessageLoop::TYPE_IO;
......@@ -467,6 +465,8 @@ class DBusThreadManagerImpl : public DBusThreadManager {
scoped_refptr<dbus::Bus> system_bus_;
scoped_ptr<DBusClientBundle> client_bundle_;
scoped_ptr<PowerPolicyController> power_policy_controller_;
DISALLOW_COPY_AND_ASSIGN(DBusThreadManagerImpl);
};
// static
......
......@@ -5,8 +5,6 @@
#ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_
#define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_
#include <string>
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
......@@ -14,12 +12,12 @@
namespace base {
class Thread;
};
} // namespace base
namespace dbus {
class Bus;
class ObjectPath;
};
} // namespace dbus
namespace chromeos {
......
......@@ -235,8 +235,7 @@ void FakeDBusThreadManager::SetShillProfileClient(
shill_profile_client_ = client.Pass();
}
void FakeDBusThreadManager::SetGsmSMSClient(
scoped_ptr<GsmSMSClient> client) {
void FakeDBusThreadManager::SetGsmSMSClient(scoped_ptr<GsmSMSClient> client) {
gsm_sms_client_ = client.Pass();
}
......@@ -275,8 +274,7 @@ void FakeDBusThreadManager::SetNfcRecordClient(
nfc_record_client_ = client.Pass();
}
void FakeDBusThreadManager::SetNfcTagClient(
scoped_ptr<NfcTagClient> client) {
void FakeDBusThreadManager::SetNfcTagClient(scoped_ptr<NfcTagClient> client) {
nfc_tag_client_ = client.Pass();
}
......@@ -314,8 +312,7 @@ void FakeDBusThreadManager::SetUpdateEngineClient(
update_engine_client_ = client.Pass();
}
void FakeDBusThreadManager::AddObserver(
DBusThreadManagerObserver* observer) {
void FakeDBusThreadManager::AddObserver(DBusThreadManagerObserver* observer) {
DCHECK(observer);
observers_.AddObserver(observer);
}
......@@ -330,48 +327,45 @@ dbus::Bus* FakeDBusThreadManager::GetSystemBus() {
return NULL;
}
BluetoothAdapterClient*
FakeDBusThreadManager::GetBluetoothAdapterClient() {
BluetoothAdapterClient* FakeDBusThreadManager::GetBluetoothAdapterClient() {
return bluetooth_adapter_client_.get();
}
BluetoothAgentManagerClient*
FakeDBusThreadManager::GetBluetoothAgentManagerClient() {
FakeDBusThreadManager::GetBluetoothAgentManagerClient() {
return bluetooth_agent_manager_client_.get();
}
BluetoothDeviceClient*
FakeDBusThreadManager::GetBluetoothDeviceClient() {
BluetoothDeviceClient* FakeDBusThreadManager::GetBluetoothDeviceClient() {
return bluetooth_device_client_.get();
}
BluetoothGattCharacteristicClient*
FakeDBusThreadManager::GetBluetoothGattCharacteristicClient() {
FakeDBusThreadManager::GetBluetoothGattCharacteristicClient() {
return bluetooth_gatt_characteristic_client_.get();
}
BluetoothGattDescriptorClient*
FakeDBusThreadManager::GetBluetoothGattDescriptorClient() {
FakeDBusThreadManager::GetBluetoothGattDescriptorClient() {
return bluetooth_gatt_descriptor_client_.get();
}
BluetoothGattManagerClient*
FakeDBusThreadManager::GetBluetoothGattManagerClient() {
FakeDBusThreadManager::GetBluetoothGattManagerClient() {
return bluetooth_gatt_manager_client_.get();
}
BluetoothGattServiceClient*
FakeDBusThreadManager::GetBluetoothGattServiceClient() {
FakeDBusThreadManager::GetBluetoothGattServiceClient() {
return bluetooth_gatt_service_client_.get();
}
BluetoothInputClient*
FakeDBusThreadManager::GetBluetoothInputClient() {
BluetoothInputClient* FakeDBusThreadManager::GetBluetoothInputClient() {
return bluetooth_input_client_.get();
}
BluetoothProfileManagerClient*
FakeDBusThreadManager::GetBluetoothProfileManagerClient() {
FakeDBusThreadManager::GetBluetoothProfileManagerClient() {
return bluetooth_profile_manager_client_.get();
}
......@@ -395,28 +389,23 @@ LorgnetteManagerClient* FakeDBusThreadManager::GetLorgnetteManagerClient() {
return lorgnette_manager_client_.get();
}
ShillDeviceClient*
FakeDBusThreadManager::GetShillDeviceClient() {
ShillDeviceClient* FakeDBusThreadManager::GetShillDeviceClient() {
return shill_device_client_.get();
}
ShillIPConfigClient*
FakeDBusThreadManager::GetShillIPConfigClient() {
ShillIPConfigClient* FakeDBusThreadManager::GetShillIPConfigClient() {
return shill_ipconfig_client_.get();
}
ShillManagerClient*
FakeDBusThreadManager::GetShillManagerClient() {
ShillManagerClient* FakeDBusThreadManager::GetShillManagerClient() {
return shill_manager_client_.get();
}
ShillProfileClient*
FakeDBusThreadManager::GetShillProfileClient() {
ShillProfileClient* FakeDBusThreadManager::GetShillProfileClient() {
return shill_profile_client_.get();
}
ShillServiceClient*
FakeDBusThreadManager::GetShillServiceClient() {
ShillServiceClient* FakeDBusThreadManager::GetShillServiceClient() {
return shill_service_client_.get();
}
......@@ -428,13 +417,11 @@ ImageBurnerClient* FakeDBusThreadManager::GetImageBurnerClient() {
return image_burner_client_.get();
}
IntrospectableClient*
FakeDBusThreadManager::GetIntrospectableClient() {
IntrospectableClient* FakeDBusThreadManager::GetIntrospectableClient() {
return introspectable_client_.get();
}
ModemMessagingClient*
FakeDBusThreadManager::GetModemMessagingClient() {
ModemMessagingClient* FakeDBusThreadManager::GetModemMessagingClient() {
return modem_messaging_client_.get();
}
......@@ -458,8 +445,7 @@ NfcRecordClient* FakeDBusThreadManager::GetNfcRecordClient() {
return nfc_record_client_.get();
}
PermissionBrokerClient*
FakeDBusThreadManager::GetPermissionBrokerClient() {
PermissionBrokerClient* FakeDBusThreadManager::GetPermissionBrokerClient() {
return permission_broker_client_.get();
}
......@@ -467,13 +453,11 @@ PowerManagerClient* FakeDBusThreadManager::GetPowerManagerClient() {
return power_manager_client_.get();
}
PowerPolicyController*
FakeDBusThreadManager::GetPowerPolicyController() {
PowerPolicyController* FakeDBusThreadManager::GetPowerPolicyController() {
return power_policy_controller_.get();
}
SessionManagerClient*
FakeDBusThreadManager::GetSessionManagerClient() {
SessionManagerClient* FakeDBusThreadManager::GetSessionManagerClient() {
return session_manager_client_.get();
}
......
......@@ -5,8 +5,6 @@
#ifndef CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
#define CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
#include <string>
#include "base/logging.h"
#include "base/observer_list.h"
#include "chromeos/chromeos_export.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment