chromium/components/commerce/core/heuristics/commerce_heuristics_provider.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/commerce/core/heuristics/commerce_heuristics_provider.h"

#include <set>

#include "base/feature_list.h"
#include "base/json/json_reader.h"
#include "base/metrics/field_trial_params.h"
#include "base/no_destructor.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "build/buildflag.h"
#include "components/commerce/core/commerce_feature_list.h"
#include "components/commerce/core/commerce_heuristics_data.h"
#include "components/commerce/core/commerce_heuristics_data_metrics_helper.h"
#include "components/grit/components_resources.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "third_party/re2/src/re2/re2.h"
#include "ui/base/resource/resource_bundle.h"

namespace commerce_heuristics {

namespace {

constexpr unsigned kLengthLimit =;
std::string eTLDPlusOne(const GURL& url) {}

const std::map<std::string, std::string>& GetCartPatternMapping() {}

const std::map<std::string, std::string>& GetCheckoutPatternMapping() {}

const re2::RE2* GetVisitCartPattern(const GURL& url) {}

// TODO(crbug.com/40163450): cover more shopping sites.
const re2::RE2* GetVisitCheckoutPattern(const GURL& url) {}

std::string CanonicalURL(const GURL& url) {}

}  // namespace

bool IsVisitCart(const GURL& url) {}

bool IsVisitCheckout(const GURL& url) {}

bool IsAddToCartButtonSpec(int height, int width) {}

bool IsAddToCartButtonTag(const std::string& tag) {}

bool IsAddToCartButtonText(const std::string& text) {}

bool ShouldUseDOMBasedHeuristics(const GURL& url) {}

}  // namespace commerce_heuristics