summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus
diff options
context:
space:
mode:
authorbenchan@chromium.org <benchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 22:54:32 +0000
committerbenchan@chromium.org <benchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 22:54:32 +0000
commit591db952243b527edac159a3ef24421c6e68b5c5 (patch)
tree49640f2b2ca5d91db1ca5aa758b90ffcc1c4cf08 /chromeos/dbus
parentc7990dbf8e71703b4d11a6ada1e6f609a876c9ee (diff)
downloadchromium_src-591db952243b527edac159a3ef24421c6e68b5c5.zip
chromium_src-591db952243b527edac159a3ef24421c6e68b5c5.tar.gz
chromium_src-591db952243b527edac159a3ef24421c6e68b5c5.tar.bz2
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
Diffstat (limited to 'chromeos/dbus')
-rw-r--r--chromeos/dbus/dbus_client.h2
-rw-r--r--chromeos/dbus/dbus_thread_manager.cc6
-rw-r--r--chromeos/dbus/dbus_thread_manager.h6
-rw-r--r--chromeos/dbus/fake_dbus_thread_manager.cc60
-rw-r--r--chromeos/dbus/fake_dbus_thread_manager.h2
5 files changed, 28 insertions, 48 deletions
diff --git a/chromeos/dbus/dbus_client.h b/chromeos/dbus/dbus_client.h
index 94c8059..e166c5f 100644
--- a/chromeos/dbus/dbus_client.h
+++ b/chromeos/dbus/dbus_client.h
@@ -9,7 +9,7 @@
namespace dbus {
class Bus;
-};
+} // namespace dbus
namespace chromeos {
diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc
index 75402b9..4c57529 100644
--- a/chromeos/dbus/dbus_thread_manager.cc
+++ b/chromeos/dbus/dbus_thread_manager.cc
@@ -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
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h
index b1d395d..ad93a2f 100644
--- a/chromeos/dbus/dbus_thread_manager.h
+++ b/chromeos/dbus/dbus_thread_manager.h
@@ -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 {
diff --git a/chromeos/dbus/fake_dbus_thread_manager.cc b/chromeos/dbus/fake_dbus_thread_manager.cc
index 10b7835..3839b0a 100644
--- a/chromeos/dbus/fake_dbus_thread_manager.cc
+++ b/chromeos/dbus/fake_dbus_thread_manager.cc
@@ -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();
}
diff --git a/chromeos/dbus/fake_dbus_thread_manager.h b/chromeos/dbus/fake_dbus_thread_manager.h
index b3d308c..87a9ba5c 100644
--- a/chromeos/dbus/fake_dbus_thread_manager.h
+++ b/chromeos/dbus/fake_dbus_thread_manager.h
@@ -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"