#include "chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h"
#include <string>
#include <utility>
#include <vector>
#include "base/json/json_writer.h"
#include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h"
#include "chrome/browser/safe_browsing/incident_reporting/tracked_preference_incident.h"
#include "components/safe_browsing/core/common/proto/csd.pb.h"
#include "services/preferences/public/mojom/tracked_preference_validation_delegate.mojom.h"
namespace safe_browsing {
namespace {
TPIncident;
TPIncident_ValueState;
ValueState;
TPIncident_ValueState MapValueState(
ValueState value_state,
ValueState external_validation_value_state) { … }
}
PreferenceValidationDelegate::PreferenceValidationDelegate(
Profile* profile,
std::unique_ptr<IncidentReceiver> incident_receiver)
: … { … }
PreferenceValidationDelegate::~PreferenceValidationDelegate() = default;
void PreferenceValidationDelegate::OnAtomicPreferenceValidation(
const std::string& pref_path,
std::optional<base::Value> value,
ValueState value_state,
ValueState external_validation_value_state,
bool is_personal) { … }
void PreferenceValidationDelegate::OnSplitPreferenceValidation(
const std::string& pref_path,
const std::vector<std::string>& invalid_keys,
const std::vector<std::string>& external_validation_invalid_keys,
ValueState value_state,
ValueState external_validation_value_state,
bool is_personal) { … }
void PreferenceValidationDelegate::OnProfileWillBeDestroyed(Profile* profile) { … }
}