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

Unified Diff: trunk/src/chromeos/dbus/shill_client_helper.h

Issue 24293002: Revert 224179 "Track active references in ShillClientHelper" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | trunk/src/chromeos/dbus/shill_client_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chromeos/dbus/shill_client_helper.h
===================================================================
--- trunk/src/chromeos/dbus/shill_client_helper.h (revision 224203)
+++ trunk/src/chromeos/dbus/shill_client_helper.h (working copy)
@@ -41,8 +41,6 @@
// A class to help implement Shill clients.
class ShillClientHelper {
public:
- class RefHolder;
-
// A callback to handle PropertyChanged signals.
typedef base::Callback<void(const std::string& name,
const base::Value& value)> PropertyChangedHandler;
@@ -70,17 +68,11 @@
// A callback that handles responses for methods with boolean results.
typedef base::Callback<void(bool result)> BooleanCallback;
- // Callback used to notify owner when this can be safely released.
- typedef base::Callback<void(ShillClientHelper* helper)> ReleasedCallback;
- explicit ShillClientHelper(dbus::ObjectProxy* proxy);
+ ShillClientHelper(dbus::Bus* bus, dbus::ObjectProxy* proxy);
virtual ~ShillClientHelper();
- // Sets |released_callback_|. This is optional and should only be called at
- // most once.
- void SetReleasedCallback(ReleasedCallback callback);
-
// Adds an |observer| of the PropertyChanged signal.
void AddPropertyChangedObserver(ShillPropertyChangedObserver* observer);
@@ -139,8 +131,6 @@
const ListValueCallback& callback,
const ErrorCallback& error_callback);
- const dbus::ObjectProxy* object_proxy() const { return proxy_; }
-
// Appends the value (basic types and string-to-string dictionary) to the
// writer as a variant.
static void AppendValueDataAsVariant(dbus::MessageWriter* writer,
@@ -151,13 +141,6 @@
dbus::MessageWriter* writer,
const base::DictionaryValue& dictionary);
- protected:
- // Reference / Ownership management. If the number of active refs (observers
- // + in-progress method calls) becomes 0, |released_callback_| (if set) will
- // be called.
- void AddRef();
- void Release();
-
private:
// Starts monitoring PropertyChanged signal.
void MonitorPropertyChangedInternal(const std::string& interface_name);
@@ -171,8 +154,6 @@
void OnPropertyChanged(dbus::Signal* signal);
dbus::ObjectProxy* proxy_;
- ReleasedCallback released_callback_;
- int active_refs_;
PropertyChangedHandler property_changed_handler_;
ObserverList<ShillPropertyChangedObserver, true /* check_empty */>
observer_list_;
« no previous file with comments | « no previous file | trunk/src/chromeos/dbus/shill_client_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698