Index: net/base/x509_certificate_net_log_param.cc |
=================================================================== |
--- net/base/x509_certificate_net_log_param.cc (revision 141407) |
+++ net/base/x509_certificate_net_log_param.cc (working copy) |
@@ -4,25 +4,27 @@ |
#include "net/base/x509_certificate_net_log_param.h" |
+#include <string> |
+#include <vector> |
+ |
#include "base/values.h" |
#include "net/base/x509_certificate.h" |
namespace net { |
-X509CertificateNetLogParam::X509CertificateNetLogParam( |
- X509Certificate* certificate) { |
- certificate->GetPEMEncodedChain(&encoded_chain_); |
-} |
- |
-base::Value* X509CertificateNetLogParam::ToValue() const { |
+base::Value* NetLogX509CertificateNetLogCallback( |
+ scoped_refptr<const X509Certificate> certificate, |
eroman
2012/06/11 23:42:25
nit: per previous comment, might want to just pass
mmenke
2012/06/12 00:42:19
Done.
|
+ NetLog::LogLevel log_level) { |
+ if (!NetLog::IsLoggingBytes(log_level)) |
eroman
2012/06/11 23:42:25
Are you sure about this? I thought we were always
mmenke
2012/06/12 00:42:19
I actually removed it locally after noticing the c
|
+ return NULL; |
DictionaryValue* dict = new DictionaryValue(); |
ListValue* certs = new ListValue(); |
- for (size_t i = 0; i < encoded_chain_.size(); ++i) |
- certs->Append(base::Value::CreateStringValue(encoded_chain_[i])); |
+ std::vector<std::string> encoded_chain; |
+ certificate->GetPEMEncodedChain(&encoded_chain); |
+ for (size_t i = 0; i < encoded_chain.size(); ++i) |
+ certs->Append(base::Value::CreateStringValue(encoded_chain[i])); |
dict->Set("certificates", certs); |
return dict; |
} |
-X509CertificateNetLogParam::~X509CertificateNetLogParam() {} |
- |
} // namespace net |