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

Unified Diff: chromeos/dbus/shill_client_helper.h

Issue 12220025: Shill: ShillServiceClient destroys ShillClientHelpers when they are not need. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Testing add for add/remove observer. Created 7 years, 10 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 | chromeos/dbus/shill_client_helper.cc » ('j') | chromeos/dbus/shill_service_client.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_client_helper.h
diff --git a/chromeos/dbus/shill_client_helper.h b/chromeos/dbus/shill_client_helper.h
index b8f769c4fcf76dc0aaeb848b6584b78c7c875d72..1b27fffe70236d8c2894887cf13e656619871f02 100644
--- a/chromeos/dbus/shill_client_helper.h
+++ b/chromeos/dbus/shill_client_helper.h
@@ -66,6 +66,14 @@ class ShillClientHelper {
virtual ~ShillClientHelper();
+ // Returns true if there is a PropertyChangedObserver registered.
+ bool IsObserved() const;
+
+ // Returns true if the are method calls waiting for a response. If this
+ // function is called from within the return callback return true only if
+ // there are *other* calls waiting for a response.
+ bool IsWaitingResponse() const;
+
// Adds an |observer| of the PropertyChanged signal.
void AddPropertyChangedObserver(ShillPropertyChangedObserver* observer);
@@ -180,6 +188,7 @@ class ShillClientHelper {
PropertyChangedHandler property_changed_handler_;
ObserverList<ShillPropertyChangedObserver, true /* check_empty */>
observer_list_;
+ int in_progress_calls_;
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
« no previous file with comments | « no previous file | chromeos/dbus/shill_client_helper.cc » ('j') | chromeos/dbus/shill_service_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698