chromium/components/safe_browsing/core/browser/password_protection/metrics_util.cc

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

#include "components/safe_browsing/core/browser/password_protection/metrics_util.h"

#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "components/safe_browsing/core/common/utils.h"
#include "net/http/http_status_code.h"

namespace safe_browsing {

const char kAnyPasswordEntryRequestOutcomeHistogram[] =;
const char kAnyPasswordEntryVerdictHistogram[] =;
const char kEnterprisePasswordEntryRequestOutcomeHistogram[] =;
const char kEnterprisePasswordEntryVerdictHistogram[] =;
const char kEnterprisePasswordPageInfoHistogram[] =;
const char kEnterprisePasswordInterstitialHistogram[] =;
const char kEnterprisePasswordWarningDialogHistogram[] =;
const char kGmailSyncPasswordEntryRequestOutcomeHistogram[] =;
const char kGmailNonSyncPasswordEntryRequestOutcomeHistogram[] =;
const char kGSuiteSyncPasswordEntryRequestOutcomeHistogram[] =;
const char kGSuiteNonSyncPasswordEntryRequestOutcomeHistogram[] =;
const char kSavedPasswordEntryRequestOutcomeHistogram[] =;
const char kUnknownPrimaryAccountPasswordEntryVerdictHistogram[] =;
const char kUnknownNonPrimaryAccountPasswordEntryVerdictHistogram[] =;
const char kGSuiteSyncPasswordEntryVerdictHistogram[] =;
const char kGSuiteNonSyncPasswordEntryVerdictHistogram[] =;
const char kGmailSyncPasswordEntryVerdictHistogram[] =;
const char kGmailNonSyncPasswordEntryVerdictHistogram[] =;
const char kSavedPasswordEntryVerdictHistogram[] =;
const char kGmailNonSyncPasswordInterstitialHistogram[] =;
const char kGmailSyncPasswordPageInfoHistogram[] =;
const char kGmailNonSyncPasswordPageInfoHistogram[] =;
const char kSavedPasswordPageInfoHistogram[] =;
const char kGmailSyncPasswordWarningDialogHistogram[] =;
const char kGmailNonSyncPasswordWarningDialogHistogram[] =;
const char kNonSyncPasswordInterstitialHistogram[] =;
const char kNonSyncPasswordPageInfoHistogram[] =;
const char kGSuiteSyncPasswordInterstitialHistogram[] =;
const char kGSuiteNonSyncPasswordInterstitialHistogram[] =;
const char kGSuiteSyncPasswordPageInfoHistogram[] =;
const char kGSuiteNonSyncPasswordPageInfoHistogram[] =;
const char kGSuiteSyncPasswordWarningDialogHistogram[] =;
const char kGSuiteNonSyncPasswordWarningDialogHistogram[] =;
const char kSavedPasswordWarningDialogHistogram[] =;
const char kNonSyncPasswordWarningDialogHistogram[] =;
const char kPasswordOnFocusRequestOutcomeHistogram[] =;
const char kPasswordOnFocusVerdictHistogram[] =;
const char kNonSyncPasswordEntryRequestOutcomeHistogram[] =;
const char kSyncPasswordEntryRequestOutcomeHistogram[] =;
const char kSyncPasswordEntryVerdictHistogram[] =;
const char kNonSyncPasswordEntryVerdictHistogram[] =;
const char kSyncPasswordInterstitialHistogram[] =;
const char kSyncPasswordPageInfoHistogram[] =;
const char kSyncPasswordWarningDialogHistogram[] =;
const char kEnterprisePasswordAlertHistogram[] =;
const char kGsuiteSyncPasswordAlertHistogram[] =;
const char kGsuiteNonSyncPasswordAlertHistogram[] =;

const char kPasswordOnFocusRequestWithTokenHistogram[] =;
const char kAnyPasswordEntryRequestWithTokenHistogram[] =;

void LogPasswordProtectionRequestTokenHistogram(
    LoginReputationClientRequest::TriggerType trigger_type,
    bool has_access_token) {}

void LogPasswordEntryRequestOutcome(
    RequestOutcome outcome,
    ReusedPasswordAccountType password_account_type) {}

void LogPasswordOnFocusRequestOutcome(RequestOutcome outcome) {}

void LogPasswordAlertModeOutcome(
    RequestOutcome outcome,
    ReusedPasswordAccountType password_account_type) {}

void LogNoPingingReason(LoginReputationClientRequest::TriggerType trigger_type,
                        RequestOutcome reason,
                        ReusedPasswordAccountType password_account_type) {}

void LogPasswordProtectionVerdict(
    LoginReputationClientRequest::TriggerType trigger_type,
    ReusedPasswordAccountType password_account_type,
    VerdictType verdict_type) {}

void LogSyncAccountType(SyncAccountType sync_account_type) {}

void LogPasswordProtectionNetworkResponseAndDuration(
    int response_code,
    int net_error,
    const base::TimeTicks& request_start_time) {}

void LogPasswordProtectionSampleReportSent() {}

void LogWarningAction(WarningUIType ui_type,
                      WarningAction action,
                      ReusedPasswordAccountType password_account_type) {}

void LogModalWarningDialogLifetime(
    base::TimeTicks modal_construction_start_time) {}

}  // namespace safe_browsing