#include "extensions/shell/common/shell_extensions_client.h"
#include <memory>
#include <string>
#include "base/check.h"
#include "base/lazy_instance.h"
#include "base/notreached.h"
#include "components/version_info/version_info.h"
#include "content/public/common/user_agent.h"
#include "extensions/common/core_extensions_api_provider.h"
#include "extensions/common/extension_urls.h"
#include "extensions/common/features/simple_feature.h"
#include "extensions/common/permissions/permission_message_provider.h"
#include "extensions/common/url_pattern_set.h"
#include "extensions/shell/common/shell_extensions_api_provider.h"
namespace extensions {
namespace {
class ShellPermissionMessageProvider : public PermissionMessageProvider { … };
base::LazyInstance<ShellPermissionMessageProvider>::DestructorAtExit
g_permission_message_provider = …;
}
ShellExtensionsClient::ShellExtensionsClient()
: … { … }
ShellExtensionsClient::~ShellExtensionsClient() { … }
void ShellExtensionsClient::Initialize() { … }
void ShellExtensionsClient::InitializeWebStoreUrls(
base::CommandLine* command_line) { … }
const PermissionMessageProvider&
ShellExtensionsClient::GetPermissionMessageProvider() const { … }
const std::string ShellExtensionsClient::GetProductName() { … }
void ShellExtensionsClient::FilterHostPermissions(
const URLPatternSet& hosts,
URLPatternSet* new_hosts,
PermissionIDSet* permissions) const { … }
void ShellExtensionsClient::SetScriptingAllowlist(
const ScriptingAllowlist& allowlist) { … }
const ExtensionsClient::ScriptingAllowlist&
ShellExtensionsClient::GetScriptingAllowlist() const { … }
URLPatternSet ShellExtensionsClient::GetPermittedChromeSchemeHosts(
const Extension* extension,
const APIPermissionSet& api_permissions) const { … }
bool ShellExtensionsClient::IsScriptableURL(const GURL& url,
std::string* error) const { … }
const GURL& ShellExtensionsClient::GetWebstoreBaseURL() const { … }
const GURL& ShellExtensionsClient::GetNewWebstoreBaseURL() const { … }
const GURL& ShellExtensionsClient::GetWebstoreUpdateURL() const { … }
bool ShellExtensionsClient::IsBlocklistUpdateURL(const GURL& url) const { … }
}