Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / login / test / https_forwarder.h
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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "net/test/spawned_test_server/local_test_server.h"
11 #include "url/gurl.h"
12
13 namespace chromeos {
14
15 // An https test server that forwards all requests to another server. This
16 // allows a server that supports http only to be accessed over https.
17 class HTTPSForwarder : public net::LocalTestServer {
18  public:
19   explicit HTTPSForwarder(const GURL& forward_target);
20   virtual ~HTTPSForwarder();
21
22   // net::LocalTestServer:
23   virtual bool SetPythonPath() const OVERRIDE;
24   virtual bool GetTestServerPath(
25       base::FilePath* testserver_path) const OVERRIDE;
26   virtual bool GenerateAdditionalArguments(
27       base::DictionaryValue* arguments) const OVERRIDE;
28
29  private:
30   GURL forward_target_;
31
32   DISALLOW_COPY_AND_ASSIGN(HTTPSForwarder);
33 };
34
35 }  // namespace chromeos
36
37 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_