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

Unified Diff: ash/system/chromeos/network/network_icon_animation.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 | « ash/launcher/launcher_button.cc ('k') | chrome/browser/chromeos/cros/network_library_impl_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/network_icon_animation.cc
diff --git a/ash/system/chromeos/network/network_icon_animation.cc b/ash/system/chromeos/network/network_icon_animation.cc
index 1169c67bb92ddc47a2b5fb8d872a6d069b54b39a..2a6428cb0c8dbda96491b1e1076ee1dda37f517a 100644
--- a/ash/system/chromeos/network/network_icon_animation.cc
+++ b/ash/system/chromeos/network/network_icon_animation.cc
@@ -45,7 +45,7 @@ void NetworkIconAnimation::AddObserver(AnimationObserver* observer) {
void NetworkIconAnimation::RemoveObserver(AnimationObserver* observer) {
observers_.RemoveObserver(observer);
- if (observers_.size() == 0)
+ if (!observers_.might_have_observers())
animation_.Reset(); // Stops the animation and resets the current value.
}
« no previous file with comments | « ash/launcher/launcher_button.cc ('k') | chrome/browser/chromeos/cros/network_library_impl_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698