Commit 0b9c0182 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Chromium LUCI CQ

Migrate might_have_observer to empty in components/policy

Bug: 1155308
Change-Id: I07590fea32455cdecb4e9d9ed62af1e202871040
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2637089Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845244}
parent 5758dd50
......@@ -70,7 +70,7 @@ void ConfigurationPolicyPrefStore::RemoveObserver(
}
bool ConfigurationPolicyPrefStore::HasObservers() const {
return observers_.might_have_observers();
return !observers_.empty();
}
bool ConfigurationPolicyPrefStore::IsInitializationComplete() const {
......
......@@ -235,7 +235,7 @@ void PolicyServiceImpl::RemoveObserver(PolicyDomain domain,
if (it == observers_.end())
return;
it->second->RemoveObserver(observer);
if (!it->second->might_have_observers()) {
if (it->second->empty()) {
observers_.erase(it);
}
}
......
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