OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/ssl/server_bound_cert_service.h" | 5 #include "net/ssl/server_bound_cert_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "url/gurl.h" | 28 #include "url/gurl.h" |
29 | 29 |
30 #if defined(USE_NSS) | 30 #if defined(USE_NSS) |
31 #include <private/pprthred.h> // PR_DetachThread | 31 #include <private/pprthred.h> // PR_DetachThread |
32 #endif | 32 #endif |
33 | 33 |
34 namespace net { | 34 namespace net { |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 const int kKeySizeInBits = 1024; | |
39 const int kValidityPeriodInDays = 365; | 38 const int kValidityPeriodInDays = 365; |
40 // When we check the system time, we add this many days to the end of the check | 39 // When we check the system time, we add this many days to the end of the check |
41 // so the result will still hold even after chrome has been running for a | 40 // so the result will still hold even after chrome has been running for a |
42 // while. | 41 // while. |
43 const int kSystemTimeValidityBufferInDays = 90; | 42 const int kSystemTimeValidityBufferInDays = 90; |
44 | 43 |
45 // Used by the GetDomainBoundCertResult histogram to record the final | 44 // Used by the GetDomainBoundCertResult histogram to record the final |
46 // outcome of each GetDomainBoundCert or GetOrCreateDomainBoundCert call. | 45 // outcome of each GetDomainBoundCert or GetOrCreateDomainBoundCert call. |
47 // Do not re-use values. | 46 // Do not re-use values. |
48 enum GetCertResult { | 47 enum GetCertResult { |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 } | 669 } |
671 | 670 |
672 return err; | 671 return err; |
673 } | 672 } |
674 | 673 |
675 int ServerBoundCertService::cert_count() { | 674 int ServerBoundCertService::cert_count() { |
676 return server_bound_cert_store_->GetCertCount(); | 675 return server_bound_cert_store_->GetCertCount(); |
677 } | 676 } |
678 | 677 |
679 } // namespace net | 678 } // namespace net |
OLD | NEW |