chromium/chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/safe_browsing/extension_telemetry/potential_password_theft_signal_processor.h"

#include "base/check_op.h"
#include "base/containers/contains.h"
#include "chrome/browser/safe_browsing/extension_telemetry/extension_telemetry_service.h"
#include "chrome/browser/safe_browsing/extension_telemetry/password_reuse_signal.h"
#include "chrome/browser/safe_browsing/extension_telemetry/remote_host_contacted_signal.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/proto/csd.pb.h"
#include "crypto/sha2.h"

namespace safe_browsing {

// The time proximity between a password reuse event and a remote host contact
// event. Remote contacted hosts that take longer than it will not be considered
// relevant.
const base::TimeDelta kPasswordTheftLatency =;

PotentialPasswordTheftSignalProcessor::PotentialPasswordTheftSignalProcessor() =
    default;
PotentialPasswordTheftSignalProcessor::
    ~PotentialPasswordTheftSignalProcessor() = default;

void PotentialPasswordTheftSignalProcessor::ProcessSignal(
    const ExtensionSignal& signal) {}

/**
 * This method contains the main logic for signal processing.
 * Use two queues to store password reuse events and remote host contacted
 * events. Cycle through the password reuse queue to find individual password
 * reuse events, then look up the remote host events that happened within 1s in
 * the other queue. Generate the combined potential password theft signal if we
 * find such remote host events.
 */
void PotentialPasswordTheftSignalProcessor::UpdateDataStores(
    extensions::ExtensionId extension_id,
    base::Time current_time) {}

void PotentialPasswordTheftSignalProcessor::UpdatePasswordReuseInfo(
    PasswordReuseInfo& reuse_info,
    PasswordReuseInfo& incoming_reuse_info) {}

std::unique_ptr<ExtensionTelemetryReportRequest_SignalInfo>
PotentialPasswordTheftSignalProcessor::GetSignalInfoForReport(
    const extensions::ExtensionId& extension_id) {}

ExtensionTelemetryReusedPasswordAccountType
PotentialPasswordTheftSignalProcessor::
    ConvertToExtensionTelemetryReusedPasswordAccountType(
        LoginReputationClientReusedPasswordAccountType
            login_rep_reused_pw_account_type) {}

bool PotentialPasswordTheftSignalProcessor::IsPasswordQueueEmptyForTest() {}

bool PotentialPasswordTheftSignalProcessor::IsRemoteHostURLQueueEmptyForTest() {}

bool PotentialPasswordTheftSignalProcessor::HasDataToReportForTest() const {}

}  // namespace safe_browsing