enterprise_authentication_app_link_policy_handler.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ANDROID_WEBVIEW_BROWSER_ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY_HANDLER_H_
  5. #define ANDROID_WEBVIEW_BROWSER_ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY_HANDLER_H_
  6. #include "android_webview/browser/aw_browser_process.h"
  7. #include "components/policy/core/browser/configuration_policy_handler.h"
  8. #include "components/policy/core/browser/policy_error_map.h"
  9. #include "components/policy/core/browser/url_allowlist_policy_handler.h"
  10. #include "components/policy/policy_constants.h"
  11. #include "components/prefs/pref_value_map.h"
  12. #include "components/url_matcher/url_util.h"
  13. namespace policy {
  14. // Policy handler for EnterpriseAuthenticationAppLink policy
  15. class EnterpriseAuthenticationAppLinkPolicyHandler
  16. : public TypeCheckingPolicyHandler {
  17. public:
  18. EnterpriseAuthenticationAppLinkPolicyHandler(const char* policy_name,
  19. const char* pref_path);
  20. EnterpriseAuthenticationAppLinkPolicyHandler(
  21. const EnterpriseAuthenticationAppLinkPolicyHandler&) = delete;
  22. EnterpriseAuthenticationAppLinkPolicyHandler& operator=(
  23. const EnterpriseAuthenticationAppLinkPolicyHandler&) = delete;
  24. ~EnterpriseAuthenticationAppLinkPolicyHandler() override;
  25. // ConfigurationPolicyHandler methods:
  26. bool CheckPolicySettings(const PolicyMap& policies,
  27. PolicyErrorMap* errors) override;
  28. void ApplyPolicySettings(const PolicyMap& policies,
  29. PrefValueMap* prefs) override;
  30. private:
  31. bool ValidatePolicyEntry(const std::string* policy);
  32. const char* pref_path_;
  33. };
  34. } // namespace policy
  35. #endif // ANDROID_WEBVIEW_BROWSER_ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY_HANDLER_H_