blob: 390b0cab3e558131278cdc476b90896cf9a25cae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// 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.
#ifndef NET_HTTP_MOCK_ALLOW_HTTP_AUTH_PREFERENCES_H_
#define NET_HTTP_MOCK_ALLOW_HTTP_AUTH_PREFERENCES_H_
#include "net/http/http_auth_preferences.h"
namespace url {
class SchemeHostPort;
}
namespace net {
// An HttpAuthPreferences class which allows all origins to use default
// credentials and delegate. This should only be used in unit testing.
class MockAllowHttpAuthPreferences : public HttpAuthPreferences {
public:
MockAllowHttpAuthPreferences();
MockAllowHttpAuthPreferences(const MockAllowHttpAuthPreferences&) = delete;
MockAllowHttpAuthPreferences& operator=(const MockAllowHttpAuthPreferences&) =
delete;
~MockAllowHttpAuthPreferences() override;
bool CanUseDefaultCredentials(
const url::SchemeHostPort& auth_scheme_host_port) const override;
HttpAuth::DelegationType GetDelegationType(
const url::SchemeHostPort& auth_scheme_host_port) const override;
};
} // namespace net
#endif // NET_HTTP_MOCK_ALLOW_HTTP_AUTH_PREFERENCES_H_
|