Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: net/socket/ssl_test_util.h

Issue 201083: Cache login identity for NewFTP transactions. (Closed)
Patch Set: better Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 NET_SOCKET_SSL_TEST_UTIL_H_ 5 #ifndef NET_SOCKET_SSL_TEST_UTIL_H_
6 #define NET_SOCKET_SSL_TEST_UTIL_H_ 6 #define NET_SOCKET_SSL_TEST_UTIL_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 23 matching lines...) Expand all
34 ProtoHTTP, ProtoFTP 34 ProtoHTTP, ProtoFTP
35 }; 35 };
36 36
37 // Load the test root cert, if it hasn't been loaded yet. 37 // Load the test root cert, if it hasn't been loaded yet.
38 bool LoadTestRootCert(); 38 bool LoadTestRootCert();
39 39
40 // Tells the server to enable/disable servicing each request 40 // Tells the server to enable/disable servicing each request
41 // in a separate process. Takes effect only if called before Start. 41 // in a separate process. Takes effect only if called before Start.
42 void set_forking(bool forking) { forking_ = forking; } 42 void set_forking(bool forking) { forking_ = forking; }
43 43
44 // Tells the server to enable/disable anonymous FTP user.
45 void set_ftp_enable_anonymous(bool enable) { ftp_enable_anonymous_ = enable; }
46
44 // Start src/net/tools/testserver/testserver.py and 47 // Start src/net/tools/testserver/testserver.py and
45 // ask it to serve the given protocol. 48 // ask it to serve the given protocol.
46 // If protocol is HTTP, and cert_path is not empty, serves HTTPS. 49 // If protocol is HTTP, and cert_path is not empty, serves HTTPS.
47 // file_root_url specifies the root url on the server that documents will be 50 // file_root_url specifies the root url on the server that documents will be
48 // served out of. This is /files/ by default. 51 // served out of. This is /files/ by default.
49 // Returns true on success, false if files not found or root cert 52 // Returns true on success, false if files not found or root cert
50 // not trusted. 53 // not trusted.
51 bool Start(Protocol protocol, 54 bool Start(Protocol protocol,
52 const std::string& host_name, int port, 55 const std::string& host_name, int port,
53 const FilePath& document_root, 56 const FilePath& document_root,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 109
107 FilePath cert_dir_; 110 FilePath cert_dir_;
108 111
109 FilePath python_runtime_; 112 FilePath python_runtime_;
110 113
111 base::ProcessHandle process_handle_; 114 base::ProcessHandle process_handle_;
112 115
113 // True if the server should handle each request in a separate process. 116 // True if the server should handle each request in a separate process.
114 bool forking_; 117 bool forking_;
115 118
119 // True if the server should allow anonymous FTP login.
120 bool ftp_enable_anonymous_;
121
116 // Number of tries and timeout for each try used for WaitToStart. 122 // Number of tries and timeout for each try used for WaitToStart.
117 int connection_attempts_; 123 int connection_attempts_;
118 int connection_timeout_; 124 int connection_timeout_;
119 125
120 #if defined(OS_LINUX) 126 #if defined(OS_LINUX)
121 struct PrivateCERTCertificate; 127 struct PrivateCERTCertificate;
122 PrivateCERTCertificate *cert_; 128 PrivateCERTCertificate *cert_;
123 #endif 129 #endif
124 130
125 DISALLOW_COPY_AND_ASSIGN(TestServerLauncher); 131 DISALLOW_COPY_AND_ASSIGN(TestServerLauncher);
126 }; 132 };
127 133
128 } 134 }
129 135
130 #endif // NET_SOCKET_SSL_TEST_UTIL_H_ 136 #endif // NET_SOCKET_SSL_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698