#include "components/enterprise/idle/idle_timeout_policy_handler.h"
#include <string>
#include "base/json/values_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/browsing_data/core/browsing_data_policies_utils.h"
#include "components/enterprise/idle/action_type.h"
#include "components/enterprise/idle/idle_pref_names.h"
#include "components/policy/core/browser/configuration_policy_handler.h"
#include "components/policy/core/browser/policy_error_map.h"
#include "components/policy/core/common/policy_logger.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/schema.h"
#include "components/policy/policy_constants.h"
#include "components/prefs/pref_value_map.h"
#include "components/strings/grit/components_strings.h"
namespace enterprise_idle {
namespace {
bool CheckOtherPolicySet(const policy::PolicyMap& policies,
const std::string& this_policy_name,
const std::string& other_policy_name,
policy::PolicyErrorMap* errors) { … }
bool CheckPolicyScopeSupported(const policy::PolicyMap& policies,
const std::string& policy_name,
policy::PolicyErrorMap* errors) { … }
}
IdleTimeoutPolicyHandler::IdleTimeoutPolicyHandler()
: … { … }
IdleTimeoutPolicyHandler::~IdleTimeoutPolicyHandler() = default;
void IdleTimeoutPolicyHandler::ApplyPolicySettings(
const policy::PolicyMap& policies,
PrefValueMap* prefs) { … }
bool IdleTimeoutPolicyHandler::CheckPolicySettings(
const policy::PolicyMap& policies,
policy::PolicyErrorMap* errors) { … }
IdleTimeoutActionsPolicyHandler::IdleTimeoutActionsPolicyHandler(
policy::Schema schema)
: … { … }
IdleTimeoutActionsPolicyHandler::~IdleTimeoutActionsPolicyHandler() = default;
void IdleTimeoutActionsPolicyHandler::ApplyPolicySettings(
const policy::PolicyMap& policies,
PrefValueMap* prefs) { … }
bool IdleTimeoutActionsPolicyHandler::CheckPolicySettings(
const policy::PolicyMap& policies,
policy::PolicyErrorMap* errors) { … }
void IdleTimeoutActionsPolicyHandler::PrepareForDisplaying(
policy::PolicyMap* policies) const { … }
}