chromium/chrome/browser/permissions/crowd_deny_preload_data.cc

// Copyright 2019 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/permissions/crowd_deny_preload_data.h"

#include <string>
#include <utility>

#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/no_destructor.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "components/permissions/permission_uma_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "url/gurl.h"
#include "url/origin.h"
#include "url/url_constants.h"

namespace {

DomainToReputationMap;

// Attempts to load the preload data from |proto_path|, parse it as a serialized
// chrome_browser_crowd_deny::PreloadData message, and index it by domain.
// Returns an empty map is anything goes wrong.
DomainToReputationMap LoadAndParseAndIndexPreloadDataFromDisk(
    const base::FilePath& proto_path) {}

PendingOrigin::PendingOrigin(
    url::Origin origin,
    base::OnceCallback<void(const chrome_browser_crowd_deny::SiteReputation*)>
        callback)
    :{}
PendingOrigin::~PendingOrigin() = default;

}  // namespace

CrowdDenyPreloadData::CrowdDenyPreloadData() {}

CrowdDenyPreloadData::~CrowdDenyPreloadData() = default;

// static
CrowdDenyPreloadData* CrowdDenyPreloadData::GetInstance() {}

void CrowdDenyPreloadData::GetReputationDataForSiteAsync(
    const url::Origin& origin,
    SiteReputationCallback callback) {}

void CrowdDenyPreloadData::LoadFromDisk(const base::FilePath& proto_path,
                                        const base::Version& version) {}

const CrowdDenyPreloadData::SiteReputation*
CrowdDenyPreloadData::GetReputationDataForSite(
    const url::Origin& origin) const {}

void CrowdDenyPreloadData::SetSiteReputations(DomainToReputationMap map) {}

void CrowdDenyPreloadData::CheckOriginsPendingVerification() {}

CrowdDenyPreloadData::DomainToReputationMap
CrowdDenyPreloadData::TakeSiteReputations() {}

// ScopedCrowdDenyPreloadDataOverride -----------------------------------

namespace testing {

ScopedCrowdDenyPreloadDataOverride::ScopedCrowdDenyPreloadDataOverride() {}

ScopedCrowdDenyPreloadDataOverride::~ScopedCrowdDenyPreloadDataOverride() {}

void ScopedCrowdDenyPreloadDataOverride::SetOriginReputation(
    const url::Origin& origin,
    SiteReputation site_reputation) {}

void ScopedCrowdDenyPreloadDataOverride::ClearAllReputations() {}

}  // namespace testing