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

Unified Diff: chromeos/dbus/shill_client_helper.cc

Issue 23190045: Switch ObserverList::size() to ObserverList::might_have_observers() Pt.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge Created 7 years, 4 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 | « chrome/browser/ui/panels/panel_mouse_watcher.cc ('k') | chromeos/dbus/shill_manager_client_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_client_helper.cc
diff --git a/chromeos/dbus/shill_client_helper.cc b/chromeos/dbus/shill_client_helper.cc
index 61dcb4dbcb138d3882803c0ee0e320bfd2421ce4..a0af3b82dabcbfb5b98db8effe91308bb6153d9e 100644
--- a/chromeos/dbus/shill_client_helper.cc
+++ b/chromeos/dbus/shill_client_helper.cc
@@ -180,9 +180,8 @@ ShillClientHelper::ShillClientHelper(dbus::Bus* bus,
}
ShillClientHelper::~ShillClientHelper() {
- LOG_IF(ERROR, observer_list_.size() != 0u)
- << "ShillClientHelper destroyed with active observers: "
- << observer_list_.size();
+ LOG_IF(ERROR, observer_list_.might_have_observers())
+ << "ShillClientHelper destroyed with active observers";
}
void ShillClientHelper::AddPropertyChangedObserver(
@@ -203,7 +202,7 @@ void ShillClientHelper::RemovePropertyChangedObserver(
void ShillClientHelper::MonitorPropertyChanged(
const std::string& interface_name) {
- if (observer_list_.size() > 0) {
+ if (observer_list_.might_have_observers()) {
// Effectively monitor the PropertyChanged now.
MonitorPropertyChangedInternal(interface_name);
} else {
« no previous file with comments | « chrome/browser/ui/panels/panel_mouse_watcher.cc ('k') | chromeos/dbus/shill_manager_client_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698