diff --git a/components/brave_ads/core/internal/catalog/catalog.cc b/components/brave_ads/core/internal/catalog/catalog.cc index 6e529bed80e5..d7f4da68bbb0 100644 --- a/components/brave_ads/core/internal/catalog/catalog.cc +++ b/components/brave_ads/core/internal/catalog/catalog.cc @@ -102,15 +102,15 @@ void Catalog::MaybeFetchCatalog() const { } } -void Catalog::NotifyDidUpdateCatalog(const CatalogInfo& catalog) const { +void Catalog::NotifyDidFetchCatalog(const CatalogInfo& catalog) const { for (CatalogObserver& observer : observers_) { - observer.OnDidUpdateCatalog(catalog); + observer.OnDidFetchCatalog(catalog); } } -void Catalog::NotifyFailedToUpdateCatalog() const { +void Catalog::NotifyFailedToFetchCatalog() const { for (CatalogObserver& observer : observers_) { - observer.OnFailedToUpdateCatalog(); + observer.OnFailedToFetchCatalog(); } } @@ -138,11 +138,11 @@ void Catalog::OnDidFetchCatalog(const CatalogInfo& catalog) { SaveCatalog(catalog); - NotifyDidUpdateCatalog(catalog); + NotifyDidFetchCatalog(catalog); } void Catalog::OnFailedToFetchCatalog() { - NotifyFailedToUpdateCatalog(); + NotifyFailedToFetchCatalog(); } void Catalog::OnDidMigrateDatabase(const int /*from_version*/, diff --git a/components/brave_ads/core/internal/catalog/catalog.h b/components/brave_ads/core/internal/catalog/catalog.h index be142921297d..cf3d5c6ba7ff 100644 --- a/components/brave_ads/core/internal/catalog/catalog.h +++ b/components/brave_ads/core/internal/catalog/catalog.h @@ -46,8 +46,8 @@ class Catalog final : public AdsClientNotifierObserver, void MaybeFetchCatalog() const; - void NotifyDidUpdateCatalog(const CatalogInfo& catalog) const; - void NotifyFailedToUpdateCatalog() const; + void NotifyDidFetchCatalog(const CatalogInfo& catalog) const; + void NotifyFailedToFetchCatalog() const; // AdsClientNotifierObserver: void OnNotifyDidInitializeAds() override; diff --git a/components/brave_ads/core/internal/catalog/catalog_observer.h b/components/brave_ads/core/internal/catalog/catalog_observer.h index 3f6184e44303..2e114bd97aa8 100644 --- a/components/brave_ads/core/internal/catalog/catalog_observer.h +++ b/components/brave_ads/core/internal/catalog/catalog_observer.h @@ -14,11 +14,11 @@ struct CatalogInfo; class CatalogObserver : public base::CheckedObserver { public: - // Invoked when the catalog has updated. - virtual void OnDidUpdateCatalog(const CatalogInfo& catalog) {} + // Invoked when the catalog is successfully fetched. + virtual void OnDidFetchCatalog(const CatalogInfo& catalog) {} - // Invoked when the catalog failed to update. - virtual void OnFailedToUpdateCatalog() {} + // Invoked when the catalog fetch fails. + virtual void OnFailedToFetchCatalog() {} }; } // namespace brave_ads diff --git a/components/brave_ads/core/internal/catalog/catalog_observer_mock.h b/components/brave_ads/core/internal/catalog/catalog_observer_mock.h index c0aaf0f10457..1168f52c0c54 100644 --- a/components/brave_ads/core/internal/catalog/catalog_observer_mock.h +++ b/components/brave_ads/core/internal/catalog/catalog_observer_mock.h @@ -23,9 +23,9 @@ class CatalogObserverMock : public CatalogObserver { ~CatalogObserverMock() override; - MOCK_METHOD(void, OnDidUpdateCatalog, (const CatalogInfo& catalog)); + MOCK_METHOD(void, OnDidFetchCatalog, (const CatalogInfo& catalog)); - MOCK_METHOD(void, OnFailedToUpdateCatalog, ()); + MOCK_METHOD(void, OnFailedToFetchCatalog, ()); }; } // namespace brave_ads