1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_
10 #include "base/compiler_specific.h"
11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
17 class ForwardingServer
;
19 // An https test server that forwards all requests to another server. This
20 // allows a server that supports http only to be accessed over https.
22 // The server will bind to |127.0.0.1| but will present a certificate issued to
24 class HTTPSForwarder
{
29 // Returns a URL that uses |ssl_host_| as the host.
30 GURL
GetURLForSSLHost(const std::string
& path
) const;
32 bool Initialize(const std::string
& ssl_host
,
33 const GURL
& forward_target
) WARN_UNUSED_RESULT
;
36 std::string ssl_host_
;
38 scoped_ptr
<ForwardingServer
> forwarding_server_
;
40 DISALLOW_COPY_AND_ASSIGN(HTTPSForwarder
);
43 } // namespace chromeos
45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_