Home | History | Annotate | Download | only in base
      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_BASE_CONNECTION_TYPE_HISTOGRAMS_H_
      6 #define NET_BASE_CONNECTION_TYPE_HISTOGRAMS_H_
      7 
      8 // The UpdateConnectionTypeHistograms function collects statistics related
      9 // to the number of MD5 certificates that our users are encountering.  The
     10 // information will help us decide when it is fine for browsers to stop
     11 // supporting MD5 certificates, in light of the recent MD5 certificate
     12 // collision attack (see "MD5 considered harmful today: Creating a rogue CA
     13 // certificate" at http://www.win.tue.nl/hashclash/rogue-ca/).
     14 
     15 namespace net {
     16 
     17 enum ConnectionType {
     18   CONNECTION_ANY = 0,      // Any connection (SSL, HTTP, SPDY, etc)
     19   CONNECTION_SSL = 1,      // An SSL connection
     20   CONNECTION_SSL_MD5 = 2,  // An SSL connection with an MD5 certificate in
     21                            // the certificate chain (excluding root)
     22   CONNECTION_SSL_MD2 = 3,  // An SSL connection with an MD2 certificate in
     23                            // the certificate chain (excluding root)
     24   CONNECTION_SSL_MD4 = 4,  // An SSL connection with an MD4 certificate in
     25                            // the certificate chain (excluding root)
     26   CONNECTION_SSL_MD5_CA = 5,  // An SSL connection with an MD5 CA certificate
     27                               // in the certificate chain (excluding root)
     28   CONNECTION_SSL_MD2_CA = 6,  // An SSL connection with an MD2 CA certificate
     29                               // in the certificate chain (excluding root)
     30   CONNECTION_HTTP = 7,     // An HTTP connection
     31   CONNECTION_SPDY = 8,     // A SPDY connection
     32   NUM_OF_CONNECTION_TYPES
     33 };
     34 
     35 // Update the connection type histograms.  |type| is the connection type.
     36 // |success| is whether or not the connection was successful or not.
     37 void UpdateConnectionTypeHistograms(ConnectionType type, bool success);
     38 
     39 }  // namespace net
     40 
     41 #endif  // NET_BASE_CONNECTION_TYPE_HISTOGRAMS_H_
     42