| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "net/test/spawned_test_server/local_test_server.h" | 10 #include "net/test/spawned_test_server/local_test_server.h" |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 | 14 |
| 15 // An https test server that forwards all requests to another server. This | 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. | 16 // allows a server that supports http only to be accessed over https. |
| 17 class HTTPSForwarder : public net::LocalTestServer { | 17 class HTTPSForwarder : public net::LocalTestServer { |
| 18 public: | 18 public: |
| 19 explicit HTTPSForwarder(const GURL& forward_target); | 19 explicit HTTPSForwarder(const GURL& forward_target); |
| 20 virtual ~HTTPSForwarder(); | 20 ~HTTPSForwarder() override; |
| 21 | 21 |
| 22 // net::LocalTestServer: | 22 // net::LocalTestServer: |
| 23 virtual bool SetPythonPath() const override; | 23 bool SetPythonPath() const override; |
| 24 virtual bool GetTestServerPath( | 24 bool GetTestServerPath(base::FilePath* testserver_path) const override; |
| 25 base::FilePath* testserver_path) const override; | 25 bool GenerateAdditionalArguments( |
| 26 virtual bool GenerateAdditionalArguments( | |
| 27 base::DictionaryValue* arguments) const override; | 26 base::DictionaryValue* arguments) const override; |
| 28 | 27 |
| 29 private: | 28 private: |
| 30 GURL forward_target_; | 29 GURL forward_target_; |
| 31 | 30 |
| 32 DISALLOW_COPY_AND_ASSIGN(HTTPSForwarder); | 31 DISALLOW_COPY_AND_ASSIGN(HTTPSForwarder); |
| 33 }; | 32 }; |
| 34 | 33 |
| 35 } // namespace chromeos | 34 } // namespace chromeos |
| 36 | 35 |
| 37 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ | 36 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ |
| OLD | NEW |