Commit 28f9b681 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Chromium LUCI CQ

Migrate might_have_observer to empty in components/prefs and services/

Bug: 1155308
Change-Id: Ib42a0acc0a29beb35ced0e9cd717456c1d62a92e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2638540Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845285}
parent 9fa26f5b
......@@ -30,7 +30,7 @@ void DefaultPrefStore::RemoveObserver(PrefStore::Observer* observer) {
}
bool DefaultPrefStore::HasObservers() const {
return observers_.might_have_observers();
return !observers_.empty();
}
void DefaultPrefStore::SetDefaultValue(const std::string& key, Value value) {
......
......@@ -36,7 +36,7 @@ void InMemoryPrefStore::RemoveObserver(PrefStore::Observer* observer) {
}
bool InMemoryPrefStore::HasObservers() const {
return observers_.might_have_observers();
return !observers_.empty();
}
bool InMemoryPrefStore::IsInitializationComplete() const {
......
......@@ -196,8 +196,7 @@ void JsonPrefStore::RemoveObserver(PrefStore::Observer* observer) {
bool JsonPrefStore::HasObservers() const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return observers_.might_have_observers();
return !observers_.empty();
}
bool JsonPrefStore::IsInitializationComplete() const {
......
......@@ -63,7 +63,7 @@ void OverlayUserPrefStore::RemoveObserver(PrefStore::Observer* observer) {
}
bool OverlayUserPrefStore::HasObservers() const {
return observers_.might_have_observers();
return !observers_.empty();
}
bool OverlayUserPrefStore::IsInitializationComplete() const {
......
......@@ -44,7 +44,7 @@ void TestingPrefStore::RemoveObserver(PrefStore::Observer* observer) {
}
bool TestingPrefStore::HasObservers() const {
return observers_.might_have_observers();
return !observers_.empty();
}
bool TestingPrefStore::IsInitializationComplete() const {
......
......@@ -30,7 +30,7 @@ void ValueMapPrefStore::RemoveObserver(PrefStore::Observer* observer) {
}
bool ValueMapPrefStore::HasObservers() const {
return observers_.might_have_observers();
return !observers_.empty();
}
void ValueMapPrefStore::SetValue(const std::string& key,
......
......@@ -74,7 +74,7 @@ void SegregatedPrefStore::RemoveObserver(Observer* observer) {
}
bool SegregatedPrefStore::HasObservers() const {
return observers_.might_have_observers();
return !observers_.empty();
}
bool SegregatedPrefStore::IsInitializationComplete() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment