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

Unified Diff: net/base/x509_certificate_net_log_param.cc

Issue 10534117: Fix NetLog thread safety issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update text 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 141669)
+++ net/base/x509_certificate_net_log_param.cc (working copy)
@@ -7,13 +7,17 @@
#include <string>
#include <vector>
+#include "base/bind.h"
#include "base/values.h"
#include "net/base/x509_certificate.h"
namespace net {
-base::Value* NetLogX509CertificateCallback(const X509Certificate* certificate,
- NetLog::LogLevel log_level) {
+namespace {
+
+Value* NetLogX509CertificateCallback(
+ scoped_refptr<const X509Certificate> certificate,
+ NetLog::LogLevel log_level) {
DictionaryValue* dict = new DictionaryValue();
ListValue* certs = new ListValue();
std::vector<std::string> encoded_chain;
@@ -24,4 +28,11 @@
return dict;
}
+} // namespace
+
+NetLog::ParametersCallback CreateNetLogX509CertificateCallback(
+ scoped_refptr<const X509Certificate> certificate) {
+ return base::Bind(&NetLogX509CertificateCallback, certificate);
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698