blob: af2fd16a7db988ffb442967b73c02548f5878a7d [file] [log] [blame]
// Copyright 2018 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_WEB_APP_DATABASE_FACTORY_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_DATABASE_FACTORY_H_
#include "base/memory/raw_ptr.h"
#include "components/sync/model/model_type_store.h"
class Profile;
namespace web_app {
class AbstractWebAppDatabaseFactory {
public:
virtual ~AbstractWebAppDatabaseFactory() = default;
virtual syncer::OnceModelTypeStoreFactory GetStoreFactory() = 0;
};
class WebAppDatabaseFactory : public AbstractWebAppDatabaseFactory {
public:
explicit WebAppDatabaseFactory(Profile* profile);
WebAppDatabaseFactory(const WebAppDatabaseFactory&) = delete;
WebAppDatabaseFactory& operator=(const WebAppDatabaseFactory&) = delete;
~WebAppDatabaseFactory() override;
// AbstractWebAppDatabaseFactory implementation.
syncer::OnceModelTypeStoreFactory GetStoreFactory() override;
private:
const raw_ptr<Profile> profile_;
};
} // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_DATABASE_FACTORY_H_