blob: 55f66470354b5ad20cabf84ae1c2c97e37372d95 [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_PRIVACY_SANDBOX_TRACKING_PROTECTION_ONBOARDING_H_
#define COMPONENTS_PRIVACY_SANDBOX_TRACKING_PROTECTION_ONBOARDING_H_
#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "components/keyed_service/core/keyed_service.h"
class PrefService;
namespace privacy_sandbox {
// A Service which controls the onboarding onto tracking protection - namely
// Third Party Cookie Deprecation. It is meant to be called from the Mode B/B'
// Experiment service, as well as the Cookie Settings service.
class TrackingProtectionOnboarding : public KeyedService {
public:
// Enum value interfacing with the TrackingProtectionOnboarding service
// callers, to indicate the status the onboarding is at.
enum class OnboardingStatus {
kIneligible = 0,
kEligible = 1,
kOnboarded = 2,
kMaxValue = kOnboarded,
};
explicit TrackingProtectionOnboarding(PrefService* pref_service);
~TrackingProtectionOnboarding() override;
// KeyedService:
void Shutdown() override;
// Indicates the onboarding status for the user. Return value is the enum
// defined above.
OnboardingStatus GetOnboardingStatus() const;
private:
raw_ptr<PrefService> pref_service_;
};
} // namespace privacy_sandbox
#endif // COMPONENTS_PRIVACY_SANDBOX_TRACKING_PROTECTION_ONBOARDING_H_