ftp_server_type_histograms.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2009 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 NET_FTP_FTP_SERVER_TYPE_HISTOGRAMS_H_
6#define NET_FTP_FTP_SERVER_TYPE_HISTOGRAMS_H_
7
8// The UpdateFtpServerTypeHistograms function collects statistics related
9// to the types of FTP servers that our users are encountering.
10
11namespace net {
12
13enum FtpServerType {
14  // Record cases in which we couldn't parse the server's response. That means
15  // a server type we don't recognize, a security attack (when what we're
16  // connecting to isn't an FTP server), or a broken server.
17  SERVER_UNKNOWN = 0,
18
19  // Types 1-8 are RESERVED (were earlier used for listings recognized by
20  // Mozilla's ParseFTPList code).
21
22  SERVER_LS = 9,        // Server using /bin/ls -l listing style.
23  SERVER_WINDOWS = 10,  // Server using Windows listing style.
24  SERVER_VMS = 11,      // Server using VMS listing style.
25  SERVER_NETWARE = 12,  // Server using Netware listing style.
26
27  // Types 13-14 are RESERVED (were earlier used for MLSD listings).
28
29  SERVER_OS2 = 15,      // Server using OS/2 listing style.
30
31  NUM_OF_SERVER_TYPES
32};
33
34void UpdateFtpServerTypeHistograms(FtpServerType type);
35
36}  // namespace net
37
38#endif  // NET_FTP_FTP_SERVER_TYPE_HISTOGRAMS_H_
39