chromium/chrome/browser/cart/cart_service.h

// Copyright 2020 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_CART_CART_SERVICE_H_
#define CHROME_BROWSER_CART_CART_SERVICE_H_

#include <optional>

#include "base/containers/flat_map.h"
#include "base/functional/callback_helpers.h"
#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "base/values.h"
#include "chrome/browser/cart/cart_db.h"
#include "chrome/browser/cart/cart_discount_link_fetcher.h"
#include "chrome/browser/cart/cart_metrics_tracker.h"
#include "chrome/browser/cart/cart_service_factory.h"
#include "chrome/browser/cart/chrome_cart.mojom.h"
#include "chrome/browser/cart/discount_url_loader.h"
#include "chrome/browser/cart/fetch_discount_worker.h"
#include "chrome/browser/commerce/coupons/coupon_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "components/commerce/core/discount_consent_handler.h"
#include "components/commerce/core/proto/cart_db_content.pb.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/browser/history_service_observer.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/optimization_guide/core/optimization_guide_decider.h"
#include "components/prefs/pref_registry_simple.h"

class DiscountURLLoader;
class FetchDiscountWorker;

namespace commerce {
class ShoppingService;
}

// Service to maintain and read/write data for chrome cart module.
// TODO(crbug.com/40199234) Make this BrowserContext-based and get rid of
// Profile usage so that we can modularize this.
class CartService : public history::HistoryServiceObserver,
                    public KeyedService,
                    public commerce::DiscountConsentHandler {};

#endif  // CHROME_BROWSER_CART_CART_SERVICE_H_