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 virtual ~HTTPSForwarder(); |
21 | 21 |
22 // net::LocalTestServer: | 22 // net::LocalTestServer: |
23 virtual bool SetPythonPath() const OVERRIDE; | 23 virtual bool SetPythonPath() const override; |
24 virtual bool GetTestServerPath( | 24 virtual bool GetTestServerPath( |
25 base::FilePath* testserver_path) const OVERRIDE; | 25 base::FilePath* testserver_path) const override; |
26 virtual bool GenerateAdditionalArguments( | 26 virtual bool GenerateAdditionalArguments( |
27 base::DictionaryValue* arguments) const OVERRIDE; | 27 base::DictionaryValue* arguments) const override; |
28 | 28 |
29 private: | 29 private: |
30 GURL forward_target_; | 30 GURL forward_target_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(HTTPSForwarder); | 32 DISALLOW_COPY_AND_ASSIGN(HTTPSForwarder); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace chromeos | 35 } // namespace chromeos |
36 | 36 |
37 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ | 37 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_HTTPS_FORWARDER_H_ |
OLD | NEW |