blob: 58c42fffdf8a2dbe36ba8c5eb057e941882e1289 [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_MANAGER_H_
#include <memory>
#include <unordered_set>
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
class Profile;
class KeyedServiceBaseFactory;
namespace base {
class FilePath;
} // namespace base
namespace extensions {
class Extension;
class ExtensionRegistry;
class ExtensionService;
} // namespace extensions
namespace web_app {
class ExtensionInstallGate {
public:
virtual ~ExtensionInstallGate();
};
class ExtensionsManager {
public:
explicit ExtensionsManager(Profile* profile);
virtual ~ExtensionsManager();
virtual std::unordered_set<base::FilePath> GetIsolatedStoragePaths();
// Creates an ExtensionInstallerGate which registers itself on
// ExtensionService to delay Extension installs.
virtual std::unique_ptr<ExtensionInstallGate>
RegisterGarbageCollectionInstallGate();
static KeyedServiceBaseFactory* GetExtensionSystemSharedFactory();
private:
raw_ptr<Profile> profile_ = nullptr;
raw_ptr<extensions::ExtensionRegistry> registry_ = nullptr;
};
} // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_MANAGER_H_