#include "chrome/browser/extensions/permissions/scripting_permissions_modifier.h"
#include "base/functional/callback_helpers.h"
#include "chrome/browser/extensions/permissions/permissions_updater.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/permissions_manager.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handlers/permissions_parser.h"
#include "extensions/common/permissions/permission_set.h"
#include "extensions/common/permissions/permissions_data.h"
#include "extensions/common/url_pattern.h"
#include "extensions/common/url_pattern_set.h"
#include "extensions/common/user_script.h"
namespace extensions {
ScriptingPermissionsModifier::ScriptingPermissionsModifier(
content::BrowserContext* browser_context,
const scoped_refptr<const Extension>& extension)
: … { … }
ScriptingPermissionsModifier::~ScriptingPermissionsModifier() = default;
void ScriptingPermissionsModifier::SetWithholdHostPermissions(
bool should_withhold) { … }
void ScriptingPermissionsModifier::GrantHostPermission(const GURL& url) { … }
void ScriptingPermissionsModifier::GrantHostPermission(
const URLPattern& site,
base::OnceClosure done_callback) { … }
void ScriptingPermissionsModifier::RemoveGrantedHostPermission(
const GURL& url) { … }
void ScriptingPermissionsModifier::RemoveHostPermissions(
const URLPattern& pattern,
base::OnceClosure done_callback) { … }
void ScriptingPermissionsModifier::RemoveBroadGrantedHostPermissions() { … }
void ScriptingPermissionsModifier::RemoveAllGrantedHostPermissions() { … }
void ScriptingPermissionsModifier::GrantHostPermission(
URLPatternSet explicit_hosts,
URLPatternSet scriptable_hosts,
base::OnceClosure done_callback) { … }
void ScriptingPermissionsModifier::GrantWithheldHostPermissions() { … }
void ScriptingPermissionsModifier::WithholdHostPermissions(
URLPatternSet explicit_hosts,
URLPatternSet scriptable_hosts,
base::OnceClosure done_callback) { … }
}