chromium/net/proxy_resolution/mock_proxy_resolver.cc

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

#include "net/proxy_resolution/mock_proxy_resolver.h"

#include <memory>
#include <utility>

#include "base/check.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"

namespace net {

MockAsyncProxyResolver::RequestImpl::RequestImpl(std::unique_ptr<Job> job)
    :{}

MockAsyncProxyResolver::RequestImpl::~RequestImpl() {}

LoadState MockAsyncProxyResolver::RequestImpl::GetLoadState() {}

MockAsyncProxyResolver::Job::Job(MockAsyncProxyResolver* resolver,
                                 const GURL& url,
                                 ProxyInfo* results,
                                 CompletionOnceCallback callback)
    :{}

MockAsyncProxyResolver::Job::~Job() = default;

void MockAsyncProxyResolver::Job::CompleteNow(int rv) {}

MockAsyncProxyResolver::~MockAsyncProxyResolver() = default;

int MockAsyncProxyResolver::GetProxyForURL(
    const GURL& url,
    const NetworkAnonymizationKey& network_anonymization_key,
    ProxyInfo* results,
    CompletionOnceCallback callback,
    std::unique_ptr<Request>* request,
    const NetLogWithSource& /*net_log*/) {}

void MockAsyncProxyResolver::AddCancelledJob(std::unique_ptr<Job> job) {}

void MockAsyncProxyResolver::RemovePendingJob(Job* job) {}

MockAsyncProxyResolver::MockAsyncProxyResolver() = default;

MockAsyncProxyResolverFactory::Request::Request(
    MockAsyncProxyResolverFactory* factory,
    const scoped_refptr<PacFileData>& script_data,
    std::unique_ptr<ProxyResolver>* resolver,
    CompletionOnceCallback callback)
    :{}

MockAsyncProxyResolverFactory::Request::~Request() = default;

void MockAsyncProxyResolverFactory::Request::CompleteNow(
    int rv,
    std::unique_ptr<ProxyResolver> resolver) {}

void MockAsyncProxyResolverFactory::Request::CompleteNowWithForwarder(
    int rv,
    ProxyResolver* resolver) {}

void MockAsyncProxyResolverFactory::Request::FactoryDestroyed() {}

class MockAsyncProxyResolverFactory::Job
    : public ProxyResolverFactory::Request {};

MockAsyncProxyResolverFactory::MockAsyncProxyResolverFactory(
    bool resolvers_expect_pac_bytes)
    :{}

int MockAsyncProxyResolverFactory::CreateProxyResolver(
    const scoped_refptr<PacFileData>& pac_script,
    std::unique_ptr<ProxyResolver>* resolver,
    CompletionOnceCallback callback,
    std::unique_ptr<ProxyResolverFactory::Request>* request_handle) {}

void MockAsyncProxyResolverFactory::RemovePendingRequest(Request* request) {}

MockAsyncProxyResolverFactory::~MockAsyncProxyResolverFactory() {}

ForwardingProxyResolver::ForwardingProxyResolver(ProxyResolver* impl)
    :{}

int ForwardingProxyResolver::GetProxyForURL(
    const GURL& query_url,
    const NetworkAnonymizationKey& network_anonymization_key,
    ProxyInfo* results,
    CompletionOnceCallback callback,
    std::unique_ptr<Request>* request,
    const NetLogWithSource& net_log) {}

}  // namespace net