summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorcaitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-26 22:01:39 +0000
committercaitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-26 22:01:39 +0000
commit14e0ec68b68a548cf44506b425e485ecb0c5ab2d (patch)
tree61153fe334f8452e96275a810243bc79a594a3d6 /android_webview
parent08d403c065377c358a93eb07a8b935d72b3b970b (diff)
downloadchromium_src-14e0ec68b68a548cf44506b425e485ecb0c5ab2d.zip
chromium_src-14e0ec68b68a548cf44506b425e485ecb0c5ab2d.tar.gz
chromium_src-14e0ec68b68a548cf44506b425e485ecb0c5ab2d.tar.bz2
Switch prefs to use ObserverList::might_have_observers instead of ObserverList::size.
See issue for rationale behind this change. BUG=278526 TEST=no change TBR=benm@chromium.org (TBR'ing for prefs API change). Review URL: https://chromiumcodereview.appspot.com/22986034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/browser/aw_pref_store.cc4
-rw-r--r--android_webview/browser/aw_pref_store.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/android_webview/browser/aw_pref_store.cc b/android_webview/browser/aw_pref_store.cc
index 613a847..0720ee9 100644
--- a/android_webview/browser/aw_pref_store.cc
+++ b/android_webview/browser/aw_pref_store.cc
@@ -29,8 +29,8 @@ void AwPrefStore::RemoveObserver(PrefStore::Observer* observer) {
observers_.RemoveObserver(observer);
}
-size_t AwPrefStore::NumberOfObservers() const {
- return observers_.size();
+bool AwPrefStore::HasObservers() const {
+ return observers_.might_have_observers();
}
bool AwPrefStore::IsInitializationComplete() const {
diff --git a/android_webview/browser/aw_pref_store.h b/android_webview/browser/aw_pref_store.h
index e636e1b..8581a03 100644
--- a/android_webview/browser/aw_pref_store.h
+++ b/android_webview/browser/aw_pref_store.h
@@ -26,7 +26,7 @@ class AwPrefStore : public PersistentPrefStore {
const base::Value** result) const OVERRIDE;
virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE;
virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE;
- virtual size_t NumberOfObservers() const OVERRIDE;
+ virtual bool HasObservers() const OVERRIDE;
virtual bool IsInitializationComplete() const OVERRIDE;
// PersistentPrefStore overrides: