#ifndef CHROME_BROWSER_EXTENSIONS_PREFERENCE_PREFERENCE_HELPERS_H_
#define CHROME_BROWSER_EXTENSIONS_PREFERENCE_PREFERENCE_HELPERS_H_
#include <string>
#include "base/values.h"
#include "build/chromeos_buildflags.h"
#include "extensions/browser/extension_event_histogram_value.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/mojom/api_permission_id.mojom-shared.h"
#include "extensions/common/permissions/permission_set.h"
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/crosapi/mojom/prefs.mojom-shared.h"
#include "chromeos/crosapi/mojom/prefs.mojom.h"
#endif
class PrefService;
class Profile;
namespace extensions {
namespace preference_helpers {
const char* GetLevelOfControl(Profile* profile,
const ExtensionId& extension_id,
const std::string& browser_pref,
bool incognito);
#if BUILDFLAG(IS_CHROMEOS_LACROS)
const char* GetLevelOfControlWithAshControlState(
crosapi::mojom::PrefControlState control_state,
Profile* profile,
const ExtensionId& extension_id,
const std::string& browser_pref,
bool incognito);
void DispatchEventToExtensionsWithAshControlState(
Profile* profile,
events::HistogramValue histogram_value,
const std::string& event_name,
base::Value::List args,
mojom::APIPermissionID permission,
bool incognito,
const std::string& browser_pref,
crosapi::mojom::PrefControlState control_state);
#endif
void DispatchEventToExtensions(Profile* profile,
events::HistogramValue histogram_value,
const std::string& event_name,
base::Value::List args,
mojom::APIPermissionID permission,
bool incognito,
const std::string& browser_pref);
PrefService* GetProfilePrefService(Profile* profile, bool incognito);
}
}
#endif