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

Unified Diff: net/base/x509_certificate_net_log_param.cc

Issue 10539094: NetLogEventParameter to Callback refactoring 1, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unneeded line Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
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,24 @@
#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* NetLogX509CertificateCallback(const X509Certificate* certificate,
+ NetLog::LogLevel log_level) {
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

Powered by Google App Engine
This is Rietveld 408576698