chromium/chrome/browser/safe_browsing/download_protection/download_feedback_service.cc

// Copyright 2013 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/download_protection/download_feedback_service.h"

#include <utility>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_conversions.h"
#include "base/supports_user_data.h"
#include "base/task/task_runner.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/safe_browsing/download_protection/download_feedback.h"
#include "components/download/public/common/download_item.h"
#include "content/public/browser/browser_thread.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"

namespace safe_browsing {

namespace {

const void* const kPingKey =;

class DownloadFeedbackPings : public base::SupportsUserData::Data {};

DownloadFeedbackPings::DownloadFeedbackPings(const std::string& ping_request,
                                             const std::string& ping_response)
    :{}

// static
void DownloadFeedbackPings::CreateForDownload(
    download::DownloadItem* download,
    const std::string& ping_request,
    const std::string& ping_response) {}

// static
DownloadFeedbackPings* DownloadFeedbackPings::FromDownload(
    const download::DownloadItem& download) {}

}  // namespace

DownloadFeedbackService::DownloadFeedbackService(
    DownloadProtectionService* download_protection_service,
    base::TaskRunner* file_task_runner)
    :{}

DownloadFeedbackService::~DownloadFeedbackService() {}

// static
void DownloadFeedbackService::MaybeStorePingsForDownload(
    DownloadCheckResult result,
    bool upload_requested,
    download::DownloadItem* download,
    const std::string& ping,
    const std::string& response) {}

// static
bool DownloadFeedbackService::IsEnabledForDownload(
    const download::DownloadItem& download) {}

// static
bool DownloadFeedbackService::GetPingsForDownloadForTesting(
    const download::DownloadItem& download,
    std::string* ping,
    std::string* response) {}

void DownloadFeedbackService::BeginFeedbackForDownload(
    Profile* profile,
    download::DownloadItem* download,
    DownloadCommands::Command download_command) {}

// static
void DownloadFeedbackService::BeginFeedbackOrDeleteFile(
    const scoped_refptr<base::TaskRunner>& file_task_runner,
    const base::WeakPtr<DownloadFeedbackService>& service,
    Profile* profile,
    const std::string& ping_request,
    const std::string& ping_response,
    uint64_t file_size,
    const base::FilePath& path) {}

void DownloadFeedbackService::StartPendingFeedback() {}

void DownloadFeedbackService::BeginFeedback(Profile* profile,
                                            const std::string& ping_request,
                                            const std::string& ping_response,
                                            const base::FilePath& path,
                                            uint64_t file_size) {}

void DownloadFeedbackService::FeedbackComplete() {}

}  // namespace safe_browsing