summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 10:17:05 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 10:17:05 +0000
commit54c14d283975e0aa3bd73a5ed89ad817cfb54088 (patch)
treef33f7fe861998231bf8091f06b3a175f1c9fea11 /chromeos
parent3ec7e5e46998f39a5b6056cb090427d383eb53a7 (diff)
downloadchromium_src-54c14d283975e0aa3bd73a5ed89ad817cfb54088.zip
chromium_src-54c14d283975e0aa3bd73a5ed89ad817cfb54088.tar.gz
chromium_src-54c14d283975e0aa3bd73a5ed89ad817cfb54088.tar.bz2
Remove unused DBusThreadManagerObserver
BUG=None Review URL: https://codereview.chromium.org/457563002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289254 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/dbus/dbus_thread_manager.cc19
-rw-r--r--chromeos/dbus/dbus_thread_manager.h6
-rw-r--r--chromeos/dbus/dbus_thread_manager_observer.h26
-rw-r--r--chromeos/dbus/fake_dbus_thread_manager.cc14
-rw-r--r--chromeos/dbus/fake_dbus_thread_manager.h9
5 files changed, 0 insertions, 74 deletions
diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc
index e372005..ecd1018 100644
--- a/chromeos/dbus/dbus_thread_manager.cc
+++ b/chromeos/dbus/dbus_thread_manager.cc
@@ -5,7 +5,6 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "base/command_line.h"
-#include "base/observer_list.h"
#include "base/sys_info.h"
#include "base/threading/thread.h"
#include "chromeos/chromeos_switches.h"
@@ -22,7 +21,6 @@
#include "chromeos/dbus/cros_disks_client.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_client.h"
-#include "chromeos/dbus/dbus_thread_manager_observer.h"
#include "chromeos/dbus/debug_daemon_client.h"
#include "chromeos/dbus/easy_unlock_client.h"
#include "chromeos/dbus/fake_dbus_thread_manager.h"
@@ -279,9 +277,6 @@ class DBusThreadManagerImpl : public DBusThreadManager {
}
virtual ~DBusThreadManagerImpl() {
- FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_,
- OnDBusThreadManagerDestroying(this));
-
// PowerPolicyController's destructor depends on PowerManagerClient.
power_policy_controller_.reset();
@@ -297,16 +292,6 @@ class DBusThreadManagerImpl : public DBusThreadManager {
}
// DBusThreadManager overrides:
- virtual void AddObserver(DBusThreadManagerObserver* observer) OVERRIDE {
- DCHECK(observer);
- observers_.AddObserver(observer);
- }
-
- virtual void RemoveObserver(DBusThreadManagerObserver* observer) OVERRIDE {
- DCHECK(observer);
- observers_.RemoveObserver(observer);
- }
-
virtual dbus::Bus* GetSystemBus() OVERRIDE {
return system_bus_.get();
}
@@ -466,10 +451,6 @@ class DBusThreadManagerImpl : public DBusThreadManager {
power_policy_controller_.reset(new PowerPolicyController);
}
- // Note: Keep this before other members so they can call AddObserver() in
- // their c'tors.
- ObserverList<DBusThreadManagerObserver> observers_;
-
scoped_ptr<base::Thread> dbus_thread_;
scoped_refptr<dbus::Bus> system_bus_;
scoped_ptr<DBusClientBundle> client_bundle_;
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h
index f225a5e..2a5e335b 100644
--- a/chromeos/dbus/dbus_thread_manager.h
+++ b/chromeos/dbus/dbus_thread_manager.h
@@ -21,8 +21,6 @@ class ObjectPath;
namespace chromeos {
-class DBusThreadManagerObserver;
-
// Style Note: Clients are sorted by names.
class BluetoothAdapterClient;
class BluetoothAgentManagerClient;
@@ -116,10 +114,6 @@ class CHROMEOS_EXPORT DBusThreadManager {
// Gets the global instance. Initialize() must be called first.
static DBusThreadManager* Get();
- // Adds or removes an observer.
- virtual void AddObserver(DBusThreadManagerObserver* observer) = 0;
- virtual void RemoveObserver(DBusThreadManagerObserver* observer) = 0;
-
// Returns various D-Bus bus instances, owned by DBusThreadManager.
virtual dbus::Bus* GetSystemBus() = 0;
diff --git a/chromeos/dbus/dbus_thread_manager_observer.h b/chromeos/dbus/dbus_thread_manager_observer.h
deleted file mode 100644
index 77ce14f..0000000
--- a/chromeos/dbus/dbus_thread_manager_observer.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_OBSERVER_H_
-#define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_OBSERVER_H_
-
-namespace chromeos {
-
-class DBusThreadManager;
-
-// Interface for classes that are interested in observing changes to the
-// DBusThreadManager.
-class DBusThreadManagerObserver {
- public:
- // Called when |manager| is about to be destroyed. |manager| is still usable
- // at this point.
- virtual void OnDBusThreadManagerDestroying(DBusThreadManager* manager) = 0;
-
- protected:
- virtual ~DBusThreadManagerObserver() {}
-};
-
-} // namespace chromeos
-
-#endif // CHROMEOS_DBUS_DBUS_THREAD_MANAGER_OBSERVER_H_
diff --git a/chromeos/dbus/fake_dbus_thread_manager.cc b/chromeos/dbus/fake_dbus_thread_manager.cc
index 38e67e3..abf26e9 100644
--- a/chromeos/dbus/fake_dbus_thread_manager.cc
+++ b/chromeos/dbus/fake_dbus_thread_manager.cc
@@ -10,7 +10,6 @@
#include "chromeos/dbus/cros_disks_client.h"
#include "chromeos/dbus/dbus_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/dbus_thread_manager_observer.h"
#include "chromeos/dbus/fake_bluetooth_adapter_client.h"
#include "chromeos/dbus/fake_bluetooth_agent_manager_client.h"
#include "chromeos/dbus/fake_bluetooth_device_client.h"
@@ -52,8 +51,6 @@ FakeDBusThreadManager::FakeDBusThreadManager() {
}
FakeDBusThreadManager::~FakeDBusThreadManager() {
- FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_,
- OnDBusThreadManagerDestroying(this));
}
void FakeDBusThreadManager::SetFakeClients() {
@@ -319,17 +316,6 @@ void FakeDBusThreadManager::SetUpdateEngineClient(
update_engine_client_ = client.Pass();
}
-void FakeDBusThreadManager::AddObserver(DBusThreadManagerObserver* observer) {
- DCHECK(observer);
- observers_.AddObserver(observer);
-}
-
-void FakeDBusThreadManager::RemoveObserver(
- DBusThreadManagerObserver* observer) {
- DCHECK(observer);
- observers_.RemoveObserver(observer);
-}
-
dbus::Bus* FakeDBusThreadManager::GetSystemBus() {
return NULL;
}
diff --git a/chromeos/dbus/fake_dbus_thread_manager.h b/chromeos/dbus/fake_dbus_thread_manager.h
index 075b906..d70f599 100644
--- a/chromeos/dbus/fake_dbus_thread_manager.h
+++ b/chromeos/dbus/fake_dbus_thread_manager.h
@@ -6,7 +6,6 @@
#define CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
#include "base/logging.h"
-#include "base/observer_list.h"
#include "chromeos/chromeos_export.h"
#include "chromeos/dbus/dbus_thread_manager.h"
@@ -17,8 +16,6 @@ class ObjectPath;
namespace chromeos {
-class DBusThreadManagerObserver;
-
// This class provides a fake implementation of DBusThreadManager, which
// hosts fake D-Bus clients.
class CHROMEOS_EXPORT FakeDBusThreadManager : public DBusThreadManager {
@@ -78,8 +75,6 @@ class CHROMEOS_EXPORT FakeDBusThreadManager : public DBusThreadManager {
void SetSystemClockClient(scoped_ptr<SystemClockClient> client);
void SetUpdateEngineClient(scoped_ptr<UpdateEngineClient> client);
- virtual void AddObserver(DBusThreadManagerObserver* observer) OVERRIDE;
- virtual void RemoveObserver(DBusThreadManagerObserver* observer) OVERRIDE;
virtual dbus::Bus* GetSystemBus() OVERRIDE;
virtual BluetoothAdapterClient* GetBluetoothAdapterClient() OVERRIDE;
@@ -124,10 +119,6 @@ class CHROMEOS_EXPORT FakeDBusThreadManager : public DBusThreadManager {
virtual UpdateEngineClient* GetUpdateEngineClient() OVERRIDE;
private:
- // Note: Keep this before other members so they can call AddObserver() in
- // their c'tors.
- ObserverList<DBusThreadManagerObserver> observers_;
-
scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_;
scoped_ptr<BluetoothAgentManagerClient> bluetooth_agent_manager_client_;
scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_;