xref: /aosp_15_r20/external/cronet/net/ssl/test_ssl_config_service.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "net/ssl/test_ssl_config_service.h"
6 
7 namespace net {
8 
TestSSLConfigService(const SSLContextConfig & config)9 TestSSLConfigService::TestSSLConfigService(const SSLContextConfig& config)
10     : config_(config) {}
11 
12 TestSSLConfigService::~TestSSLConfigService() = default;
13 
GetSSLContextConfig()14 SSLContextConfig TestSSLConfigService::GetSSLContextConfig() {
15   return config_;
16 }
17 
CanShareConnectionWithClientCerts(std::string_view hostname) const18 bool TestSSLConfigService::CanShareConnectionWithClientCerts(
19     std::string_view hostname) const {
20   return false;
21 }
22 
UpdateSSLConfigAndNotify(const SSLContextConfig & config)23 void TestSSLConfigService::UpdateSSLConfigAndNotify(
24     const SSLContextConfig& config) {
25   config_ = config;
26   NotifySSLContextConfigChange();
27 }
28 
29 }  // namespace net
30