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

Side by Side Diff: net/cert/multi_threaded_cert_verifier.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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) 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/cert/multi_threaded_cert_verifier.h" 5 #include "net/cert/multi_threaded_cert_verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 namespace { 76 namespace {
77 77
78 // The default value of max_cache_entries_. 78 // The default value of max_cache_entries_.
79 const unsigned kMaxCacheEntries = 256; 79 const unsigned kMaxCacheEntries = 256;
80 80
81 // The number of seconds for which we'll cache a cache entry. 81 // The number of seconds for which we'll cache a cache entry.
82 const unsigned kTTLSecs = 1800; // 30 minutes. 82 const unsigned kTTLSecs = 1800; // 30 minutes.
83 83
84 base::Value* CertVerifyResultCallback(const CertVerifyResult& verify_result, 84 base::Value* CertVerifyResultCallback(const CertVerifyResult& verify_result,
85 NetLog::LogLevel log_level) { 85 NetLogCaptureMode capture_mode) {
86 base::DictionaryValue* results = new base::DictionaryValue(); 86 base::DictionaryValue* results = new base::DictionaryValue();
87 results->SetBoolean("has_md5", verify_result.has_md5); 87 results->SetBoolean("has_md5", verify_result.has_md5);
88 results->SetBoolean("has_md2", verify_result.has_md2); 88 results->SetBoolean("has_md2", verify_result.has_md2);
89 results->SetBoolean("has_md4", verify_result.has_md4); 89 results->SetBoolean("has_md4", verify_result.has_md4);
90 results->SetBoolean("is_issued_by_known_root", 90 results->SetBoolean("is_issued_by_known_root",
91 verify_result.is_issued_by_known_root); 91 verify_result.is_issued_by_known_root);
92 results->SetBoolean("is_issued_by_additional_trust_anchor", 92 results->SetBoolean("is_issued_by_additional_trust_anchor",
93 verify_result.is_issued_by_additional_trust_anchor); 93 verify_result.is_issued_by_additional_trust_anchor);
94 results->SetBoolean("common_name_fallback_used", 94 results->SetBoolean("common_name_fallback_used",
95 verify_result.common_name_fallback_used); 95 verify_result.common_name_fallback_used);
96 results->SetInteger("cert_status", verify_result.cert_status); 96 results->SetInteger("cert_status", verify_result.cert_status);
97 results->Set("verified_cert", 97 results->Set("verified_cert",
98 NetLogX509CertificateCallback(verify_result.verified_cert.get(), 98 NetLogX509CertificateCallback(verify_result.verified_cert.get(),
99 log_level)); 99 capture_mode));
100 100
101 base::ListValue* hashes = new base::ListValue(); 101 base::ListValue* hashes = new base::ListValue();
102 for (std::vector<HashValue>::const_iterator it = 102 for (std::vector<HashValue>::const_iterator it =
103 verify_result.public_key_hashes.begin(); 103 verify_result.public_key_hashes.begin();
104 it != verify_result.public_key_hashes.end(); 104 it != verify_result.public_key_hashes.end();
105 ++it) { 105 ++it) {
106 hashes->AppendString(it->ToString()); 106 hashes->AppendString(it->ToString());
107 } 107 }
108 results->Set("public_key_hashes", hashes); 108 results->Set("public_key_hashes", hashes);
109 109
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 615
616 void MultiThreadedCertVerifier::OnCACertChanged( 616 void MultiThreadedCertVerifier::OnCACertChanged(
617 const X509Certificate* cert) { 617 const X509Certificate* cert) {
618 DCHECK(CalledOnValidThread()); 618 DCHECK(CalledOnValidThread());
619 619
620 ClearCache(); 620 ClearCache();
621 } 621 }
622 622
623 } // namespace net 623 } // namespace net
624 624
OLDNEW
« no previous file with comments | « net/cert/ct_signed_certificate_timestamp_log_param.cc ('k') | net/cert/x509_certificate_net_log_param.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698