#ifndef CHROME_BROWSER_PERSISTED_STATE_DB_SESSION_PROTO_DB_FACTORY_H_
#define CHROME_BROWSER_PERSISTED_STATE_DB_SESSION_PROTO_DB_FACTORY_H_
#include "base/no_destructor.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
#include "components/commerce/core/proto/commerce_subscription_db_content.pb.h"
#include "components/commerce/core/proto/parcel_tracking_db_content.pb.h"
#include "components/session_proto_db/session_proto_db.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
#if !BUILDFLAG(IS_ANDROID)
#include "components/commerce/core/proto/cart_db_content.pb.h"
#include "components/commerce/core/proto/coupon_db_content.pb.h"
#include "components/commerce/core/proto/discounts_db_content.pb.h"
#else
#include "components/commerce/core/proto/merchant_signal_db_content.pb.h"
#endif
namespace {
const char kPersistedStateDBFolder[] = …;
const char kChromeCartDBFolder[] = …;
const char kMerchantTrustSignalDBFolder[] = …;
const char kCommerceSubscriptionDBFolder[] = …;
const char kCouponDBFolder[] = …;
const char kDiscountsDBFolder[] = …;
const char kParcelTrackingDBFolder[] = …;
}
SessionProtoDBFactory<persisted_state_db::PersistedStateContentProto>*
GetPersistedStateSessionProtoDBFactory();
#if !BUILDFLAG(IS_ANDROID)
SessionProtoDBFactory<cart_db::ChromeCartContentProto>*
GetChromeCartSessionProtoDBFactory();
SessionProtoDBFactory<coupon_db::CouponContentProto>*
GetCouponSessionProtoDBFactory();
SessionProtoDBFactory<discounts_db::DiscountsContentProto>*
GetDiscountsSessionProtoDBFactory();
#else
SessionProtoDBFactory<merchant_signal_db::MerchantSignalContentProto>*
GetMerchantSignalSessionProtoDBFactory();
#endif
SessionProtoDBFactory<
commerce_subscription_db::CommerceSubscriptionContentProto>*
GetCommerceSubscriptionSessionProtoDBFactory();
SessionProtoDBFactory<parcel_tracking_db::ParcelTrackingContent>*
GetParcelTrackingSessionProtoDBFactory();
template <typename T>
class SessionProtoDBFactory : public ProfileKeyedServiceFactory { … };
template <typename T>
SessionProtoDB<T>* SessionProtoDBFactory<T>::GetForProfile(
content::BrowserContext* context) { … }
template <typename T>
SessionProtoDBFactory<T>::SessionProtoDBFactory()
: … { … }
template <typename T>
SessionProtoDBFactory<T>::~SessionProtoDBFactory() = default;
template <typename T>
KeyedService* SessionProtoDBFactory<T>::BuildServiceInstanceFor(
content::BrowserContext* context) const { … }
#endif