diff --git a/components/brave_ads/core/browser/network/oblivious_http_key_config.h b/components/brave_ads/core/browser/network/oblivious_http_key_config.h index b8b1cf4a8f3..f83a42008ed 100644 --- a/components/brave_ads/core/browser/network/oblivious_http_key_config.h +++ b/components/brave_ads/core/browser/network/oblivious_http_key_config.h @@ -42,6 +42,9 @@ class ObliviousHttpKeyConfig final { scoped_refptr url_loader_factory, GURL key_config_url); + ObliviousHttpKeyConfig(const ObliviousHttpKeyConfig&) = delete; + ObliviousHttpKeyConfig& operator=(const ObliviousHttpKeyConfig&) = delete; + ~ObliviousHttpKeyConfig(); // Fetches and caches the key config if it is missing or expired. diff --git a/components/brave_ads/core/internal/account/confirmations/queue/queue_item/confirmation_queue_item_util.h b/components/brave_ads/core/internal/account/confirmations/queue/queue_item/confirmation_queue_item_util.h index 250204ef224..63b1c35aa86 100644 --- a/components/brave_ads/core/internal/account/confirmations/queue/queue_item/confirmation_queue_item_util.h +++ b/components/brave_ads/core/internal/account/confirmations/queue/queue_item/confirmation_queue_item_util.h @@ -23,6 +23,13 @@ class ScopedDelayBeforeProcessingConfirmationQueueItemForTesting final { explicit ScopedDelayBeforeProcessingConfirmationQueueItemForTesting( base::TimeDelta delay); + ScopedDelayBeforeProcessingConfirmationQueueItemForTesting( + const ScopedDelayBeforeProcessingConfirmationQueueItemForTesting&) = + delete; + ScopedDelayBeforeProcessingConfirmationQueueItemForTesting& operator=( + const ScopedDelayBeforeProcessingConfirmationQueueItemForTesting&) = + delete; + ~ScopedDelayBeforeProcessingConfirmationQueueItemForTesting(); }; diff --git a/components/brave_ads/core/internal/common/platform/platform_helper.h b/components/brave_ads/core/internal/common/platform/platform_helper.h index d82d0fab47c..27aa9a7b2eb 100644 --- a/components/brave_ads/core/internal/common/platform/platform_helper.h +++ b/components/brave_ads/core/internal/common/platform/platform_helper.h @@ -19,6 +19,9 @@ class PlatformHelper { static void SetForTesting(const PlatformHelper* platform_helper); + PlatformHelper(const PlatformHelper&) = delete; + PlatformHelper& operator=(const PlatformHelper&) = delete; + virtual bool IsMobile() const; virtual std::string GetName() const; virtual PlatformType GetType() const; diff --git a/components/brave_ads/core/internal/common/random/random_util.h b/components/brave_ads/core/internal/common/random/random_util.h index 9e0ddc2b899..471493d723c 100644 --- a/components/brave_ads/core/internal/common/random/random_util.h +++ b/components/brave_ads/core/internal/common/random/random_util.h @@ -22,6 +22,11 @@ class ScopedRandTimeDeltaWithJitterSetterForTesting final { explicit ScopedRandTimeDeltaWithJitterSetterForTesting( base::TimeDelta time_delta); + ScopedRandTimeDeltaWithJitterSetterForTesting( + const ScopedRandTimeDeltaWithJitterSetterForTesting&) = delete; + ScopedRandTimeDeltaWithJitterSetterForTesting& operator=( + const ScopedRandTimeDeltaWithJitterSetterForTesting&) = delete; + ~ScopedRandTimeDeltaWithJitterSetterForTesting(); }; diff --git a/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.cc b/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.cc index 217d2e211c8..181d3679a98 100644 --- a/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.cc +++ b/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.cc @@ -28,9 +28,6 @@ HashedNGramsTransformation::HashedNGramsTransformation( std::make_unique(bucket_count, std::move(subgrams)); } -HashedNGramsTransformation::HashedNGramsTransformation( - HashedNGramsTransformation&& hashed_ngrams) noexcept = default; - HashedNGramsTransformation::~HashedNGramsTransformation() = default; std::unique_ptr HashedNGramsTransformation::Apply( diff --git a/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.h b/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.h index 9b9ec6db64b..04addab6763 100644 --- a/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.h +++ b/components/brave_ads/core/internal/ml/transformation/hashed_ngrams_transformation.h @@ -6,8 +6,7 @@ #ifndef BRAVE_COMPONENTS_BRAVE_ADS_CORE_INTERNAL_ML_TRANSFORMATION_HASHED_NGRAMS_TRANSFORMATION_H_ #define BRAVE_COMPONENTS_BRAVE_ADS_CORE_INTERNAL_ML_TRANSFORMATION_HASHED_NGRAMS_TRANSFORMATION_H_ -#include - +#include #include #include #include @@ -23,10 +22,9 @@ class HashedNGramsTransformation final : public Transformation { HashedNGramsTransformation(); HashedNGramsTransformation(int bucket_count, std::vector subgrams); - HashedNGramsTransformation( - HashedNGramsTransformation&& hashed_ngrams) noexcept; - HashedNGramsTransformation& operator=( - HashedNGramsTransformation&& hashed_ngrams) = delete; + HashedNGramsTransformation(const HashedNGramsTransformation&) = delete; + HashedNGramsTransformation& operator=(const HashedNGramsTransformation&) = + delete; ~HashedNGramsTransformation() override; diff --git a/components/brave_ads/core/internal/serving/eligible_ads/pacing/pacing_random_util.h b/components/brave_ads/core/internal/serving/eligible_ads/pacing/pacing_random_util.h index 5ba819f2469..d401f3bb670 100644 --- a/components/brave_ads/core/internal/serving/eligible_ads/pacing/pacing_random_util.h +++ b/components/brave_ads/core/internal/serving/eligible_ads/pacing/pacing_random_util.h @@ -14,6 +14,11 @@ class ScopedPacingRandomNumberSetterForTesting final { public: explicit ScopedPacingRandomNumberSetterForTesting(double number); + ScopedPacingRandomNumberSetterForTesting( + const ScopedPacingRandomNumberSetterForTesting&) = delete; + ScopedPacingRandomNumberSetterForTesting& operator=( + const ScopedPacingRandomNumberSetterForTesting&) = delete; + ~ScopedPacingRandomNumberSetterForTesting(); };