#include "chrome/browser/external_protocol/auto_launch_protocols_policy_handler.h"
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include "base/strings/string_util.h"
#include "base/values.h"
#include "chrome/browser/external_protocol/constants.h"
#include "chrome/common/pref_names.h"
#include "components/policy/core/browser/policy_error_map.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_pref_names.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"
#include "url/gurl.h"
namespace policy {
namespace {
const char kValidProtocolChars[] = …;
bool IsValidProtocol(const std::string_view protocol) { … }
bool IsValidOriginMatchingPattern(const std::string_view origin_pattern) { … }
}
AutoLaunchProtocolsPolicyHandler::AutoLaunchProtocolsPolicyHandler(
const policy::Schema& chrome_schema)
: … { … }
AutoLaunchProtocolsPolicyHandler::~AutoLaunchProtocolsPolicyHandler() = default;
bool AutoLaunchProtocolsPolicyHandler::CheckPolicySettings(
const PolicyMap& policies,
PolicyErrorMap* errors) { … }
void AutoLaunchProtocolsPolicyHandler::ApplyPolicySettings(
const PolicyMap& policies,
PrefValueMap* prefs) { … }
}