chromium/net/http/http_auth_handler_mock.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "net/http/http_auth_handler_mock.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/net_errors.h"
#include "net/dns/host_resolver.h"
#include "net/http/http_auth_challenge_tokenizer.h"
#include "net/http/http_request_info.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace net {

void PrintTo(const HttpAuthHandlerMock::State& state, ::std::ostream* os) {}

HttpAuthHandlerMock::HttpAuthHandlerMock() = default;

HttpAuthHandlerMock::~HttpAuthHandlerMock() = default;

void HttpAuthHandlerMock::SetGenerateExpectation(bool async, int rv) {}

bool HttpAuthHandlerMock::NeedsIdentity() {}

bool HttpAuthHandlerMock::AllowsDefaultCredentials() {}

bool HttpAuthHandlerMock::AllowsExplicitCredentials() {}

bool HttpAuthHandlerMock::Init(
    HttpAuthChallengeTokenizer* challenge,
    const SSLInfo& ssl_info,
    const NetworkAnonymizationKey& network_anonymization_key) {}

int HttpAuthHandlerMock::GenerateAuthTokenImpl(
    const AuthCredentials* credentials,
    const HttpRequestInfo* request,
    CompletionOnceCallback callback,
    std::string* auth_token) {}

HttpAuth::AuthorizationResult HttpAuthHandlerMock::HandleAnotherChallengeImpl(
    HttpAuthChallengeTokenizer* challenge) {}

void HttpAuthHandlerMock::OnGenerateAuthToken() {}

HttpAuthHandlerMock::Factory::Factory() {}

HttpAuthHandlerMock::Factory::~Factory() = default;

void HttpAuthHandlerMock::Factory::AddMockHandler(
    std::unique_ptr<HttpAuthHandler> handler,
    HttpAuth::Target target) {}

int HttpAuthHandlerMock::Factory::CreateAuthHandler(
    HttpAuthChallengeTokenizer* challenge,
    HttpAuth::Target target,
    const SSLInfo& ssl_info,
    const NetworkAnonymizationKey& network_anonymization_key,
    const url::SchemeHostPort& scheme_host_port,
    CreateReason reason,
    int nonce_count,
    const NetLogWithSource& net_log,
    HostResolver* host_resolver,
    std::unique_ptr<HttpAuthHandler>* handler) {}

}  // namespace net