summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/src/cache_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/policy_external/src/cache_manager.cc')
-rw-r--r--src/components/policy/policy_external/src/cache_manager.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc
index f44602ea69..8bfeb8407d 100644
--- a/src/components/policy/policy_external/src/cache_manager.cc
+++ b/src/components/policy/policy_external/src/cache_manager.cc
@@ -325,6 +325,20 @@ const policy_table::Strings& CacheManager::GetGroups(const PTString& app_id) {
return pt_->policy_table.app_policies_section.apps[app_id].groups;
}
+const policy_table::Strings CacheManager::GetPolicyAppNames() const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock auto_lock(cache_lock_);
+
+ const auto apps = pt_->policy_table.app_policies_section.apps;
+
+ policy_table::Strings policy_app_ids;
+ for (const auto& app : apps) {
+ policy_app_ids.push_back(app.first);
+ }
+
+ return policy_app_ids;
+}
+
bool CacheManager::CanAppKeepContext(const std::string& app_id) const {
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);