#ifndef CHROME_BROWSER_ASH_PLUGIN_VM_PLUGIN_VM_FEATURES_H_
#define CHROME_BROWSER_ASH_PLUGIN_VM_PLUGIN_VM_FEATURES_H_
#include <string>
class Profile;
namespace plugin_vm {
class PluginVmFeatures {
public:
static PluginVmFeatures* Get();
enum class ProfileSupported {
kOk,
kErrorNonPrimary,
kErrorChildAccount,
kErrorOffTheRecord,
kErrorEphemeral,
kErrorNotSupported,
};
enum class PolicyConfigured {
kOk,
kErrorUnableToCheckPolicy,
kErrorNotEnterpriseEnrolled,
kErrorUserNotAffiliated,
kErrorUnableToCheckDevicePolicy,
kErrorNotAllowedByDevicePolicy,
kErrorNotAllowedByUserPolicy,
kErrorLicenseNotSetUp,
kErrorVirtualMachinesNotAllowed,
};
struct IsAllowedDiagnostics {
bool device_supported;
ProfileSupported profile_supported;
PolicyConfigured policy_configured;
bool IsOk() const;
std::string GetTopError() const;
};
virtual IsAllowedDiagnostics GetIsAllowedDiagnostics(const Profile* profile);
virtual bool IsAllowed(const Profile* profile, std::string* reason = nullptr);
virtual bool IsConfigured(const Profile* profile);
virtual bool IsEnabled(const Profile* profile);
protected:
static void SetForTesting(PluginVmFeatures* features);
PluginVmFeatures();
virtual ~PluginVmFeatures();
private:
PluginVmFeatures(PluginVmFeatures&& registration) = delete;
PluginVmFeatures& operator=(PluginVmFeatures&& registration) = delete;
};
}
#endif