diff --git a/components/brave_ads/browser/ads_service_impl.cc b/components/brave_ads/browser/ads_service_impl.cc index 538e9fe1d3d3..af38141b0f7d 100644 --- a/components/brave_ads/browser/ads_service_impl.cc +++ b/components/brave_ads/browser/ads_service_impl.cc @@ -45,7 +45,6 @@ #include "brave/components/brave_ads/core/public/ad_units/notification_ad/notification_ad_value_util.h" #include "brave/components/brave_ads/core/public/ads_constants.h" #include "brave/components/brave_ads/core/public/ads_feature.h" -#include "brave/components/brave_ads/core/public/database/database.h" #include "brave/components/brave_ads/core/public/flags/flags_util.h" #include "brave/components/brave_ads/core/public/history/site_history.h" #include "brave/components/brave_ads/core/public/prefs/pref_names.h" diff --git a/components/brave_ads/core/internal/BUILD.gn b/components/brave_ads/core/internal/BUILD.gn index 4b39be6da65f..065164a88f7c 100644 --- a/components/brave_ads/core/internal/BUILD.gn +++ b/components/brave_ads/core/internal/BUILD.gn @@ -583,6 +583,7 @@ static_library("internal") { "creatives/segments_database_util.cc", "creatives/segments_database_util.h", "database/database.cc", + "database/database.h", "database/database_maintenance.cc", "database/database_maintenance.h", "database/database_manager.cc", diff --git a/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.cc b/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.cc index acfca84c1b69..0e6016692426 100644 --- a/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.cc +++ b/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.cc @@ -26,7 +26,6 @@ #include "brave/components/brave_ads/core/internal/global_state/global_state.h" #include "brave/components/brave_ads/core/mojom/brave_ads.mojom.h" #include "brave/components/brave_ads/core/public/ad_units/notification_ad/notification_ad_info.h" -#include "brave/components/brave_ads/core/public/database/database.h" #include "brave/components/brave_ads/core/public/flags/flags_util.h" namespace brave_ads::test { diff --git a/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.h b/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.h index be9e28022dc6..da9e1c5e902e 100644 --- a/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.h +++ b/components/brave_ads/core/internal/common/test/internal/mock_test_util_internal.h @@ -8,7 +8,6 @@ #include "base/files/file_path.h" #include "brave/components/brave_ads/core/internal/ads_client/ads_client_mock.h" -#include "brave/components/brave_ads/core/public/database/database.h" namespace brave_ads::test { diff --git a/components/brave_ads/core/internal/common/test/test_base.cc b/components/brave_ads/core/internal/common/test/test_base.cc index 094c2404f4b0..5af58ef80761 100644 --- a/components/brave_ads/core/internal/common/test/test_base.cc +++ b/components/brave_ads/core/internal/common/test/test_base.cc @@ -27,12 +27,12 @@ #include "brave/components/brave_ads/core/internal/common/test/test_constants.h" #include "brave/components/brave_ads/core/internal/common/test/test_types.h" #include "brave/components/brave_ads/core/internal/common/test/time_test_util.h" +#include "brave/components/brave_ads/core/internal/database/database.h" #include "brave/components/brave_ads/core/internal/database/database_manager.h" #include "brave/components/brave_ads/core/internal/deprecated/client/client_state_manager.h" #include "brave/components/brave_ads/core/internal/deprecated/confirmations/confirmation_state_manager.h" #include "brave/components/brave_ads/core/internal/global_state/global_state.h" #include "brave/components/brave_ads/core/public/ads.h" -#include "brave/components/brave_ads/core/public/ads_client/ads_client_notifier_observer.h" #include "brave/components/brave_ads/core/public/ads_constants.h" namespace brave_ads::test { diff --git a/components/brave_ads/core/internal/database/database.cc b/components/brave_ads/core/internal/database/database.cc index 7af25532f6b6..f525dcbdb416 100644 --- a/components/brave_ads/core/internal/database/database.cc +++ b/components/brave_ads/core/internal/database/database.cc @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#include "brave/components/brave_ads/core/public/database/database.h" +#include "brave/components/brave_ads/core/internal/database/database.h" #include #include diff --git a/components/brave_ads/core/public/database/database.h b/components/brave_ads/core/internal/database/database.h similarity index 92% rename from components/brave_ads/core/public/database/database.h rename to components/brave_ads/core/internal/database/database.h index 97a10195829f..923c94df91e8 100644 --- a/components/brave_ads/core/public/database/database.h +++ b/components/brave_ads/core/internal/database/database.h @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#ifndef BRAVE_COMPONENTS_BRAVE_ADS_CORE_PUBLIC_DATABASE_DATABASE_H_ -#define BRAVE_COMPONENTS_BRAVE_ADS_CORE_PUBLIC_DATABASE_DATABASE_H_ +#ifndef BRAVE_COMPONENTS_BRAVE_ADS_CORE_INTERNAL_DATABASE_DATABASE_H_ +#define BRAVE_COMPONENTS_BRAVE_ADS_CORE_INTERNAL_DATABASE_DATABASE_H_ #include @@ -80,4 +80,4 @@ class ADS_EXPORT Database final { } // namespace brave_ads -#endif // BRAVE_COMPONENTS_BRAVE_ADS_CORE_PUBLIC_DATABASE_DATABASE_H_ +#endif // BRAVE_COMPONENTS_BRAVE_ADS_CORE_INTERNAL_DATABASE_DATABASE_H_ diff --git a/components/brave_ads/core/internal/database/database_manager.cc b/components/brave_ads/core/internal/database/database_manager.cc index 75356ddf3d25..d925ff2b73e3 100644 --- a/components/brave_ads/core/internal/database/database_manager.cc +++ b/components/brave_ads/core/internal/database/database_manager.cc @@ -14,13 +14,13 @@ #include "base/task/thread_pool.h" #include "brave/components/brave_ads/core/internal/common/database/database_transaction_util.h" #include "brave/components/brave_ads/core/internal/common/logging_util.h" +#include "brave/components/brave_ads/core/internal/database/database.h" #include "brave/components/brave_ads/core/internal/global_state/global_state.h" #include "brave/components/brave_ads/core/internal/legacy_migration/database/database_constants.h" #include "brave/components/brave_ads/core/internal/legacy_migration/database/database_creation.h" #include "brave/components/brave_ads/core/internal/legacy_migration/database/database_migration.h" #include "brave/components/brave_ads/core/internal/legacy_migration/database/database_raze.h" #include "brave/components/brave_ads/core/mojom/brave_ads.mojom.h" -#include "brave/components/brave_ads/core/public/database/database.h" namespace brave_ads { diff --git a/components/brave_ads/core/public/BUILD.gn b/components/brave_ads/core/public/BUILD.gn index 6bb1c3211d03..8d5d10f35482 100644 --- a/components/brave_ads/core/public/BUILD.gn +++ b/components/brave_ads/core/public/BUILD.gn @@ -31,7 +31,6 @@ source_set("headers") { "ads_feature.h", "ads_observer_interface.h", "ads_util.h", - "database/database.h", "export.h", "flags/flags_util.h", "history/ad_history_feature.h", @@ -53,7 +52,6 @@ source_set("headers") { deps = [ "//base", - "//sql", "//url", ]