| Index: net/socket/nss_ssl_util.cc
|
| diff --git a/net/socket/nss_ssl_util.cc b/net/socket/nss_ssl_util.cc
|
| index 7b068545a55290b6368816a992cca3f7161d720e..a238a25d2d4be95623fead070880556aa2c7aa64 100644
|
| --- a/net/socket/nss_ssl_util.cc
|
| +++ b/net/socket/nss_ssl_util.cc
|
| @@ -29,6 +29,8 @@
|
| #include "base/win/windows_version.h"
|
| #endif
|
|
|
| +namespace net {
|
| +
|
| namespace {
|
|
|
| // CiphersRemove takes a zero-terminated array of cipher suite ids in
|
| @@ -77,9 +79,15 @@ size_t CiphersCopy(const uint16* in, uint16* out) {
|
| }
|
| }
|
|
|
| -} // anonymous namespace
|
| -
|
| -namespace net {
|
| +base::Value* NetLogSSLErrorCallback(int net_error,
|
| + int ssl_lib_error,
|
| + NetLog::LogLevel /* log_level */) {
|
| + base::DictionaryValue* dict = new base::DictionaryValue();
|
| + dict->SetInteger("net_error", net_error);
|
| + if (ssl_lib_error)
|
| + dict->SetInteger("ssl_lib_error", ssl_lib_error);
|
| + return dict;
|
| +}
|
|
|
| class NSSSSLInitSingleton {
|
| public:
|
| @@ -201,9 +209,11 @@ class NSSSSLInitSingleton {
|
| PRFileDesc* model_fd_;
|
| };
|
|
|
| -static base::LazyInstance<NSSSSLInitSingleton>::Leaky g_nss_ssl_init_singleton =
|
| +base::LazyInstance<NSSSSLInitSingleton>::Leaky g_nss_ssl_init_singleton =
|
| LAZY_INSTANCE_INITIALIZER;
|
|
|
| +} // anonymous namespace
|
| +
|
| // Initialize the NSS SSL library if it isn't already initialized. This must
|
| // be called before any other NSS SSL functions. This function is
|
| // thread-safe, and the NSS SSL library will only ever be initialized once.
|
| @@ -399,4 +409,9 @@ void LogFailedNSSFunction(const BoundNetLog& net_log,
|
| function, param, PR_GetError()));
|
| }
|
|
|
| +NetLog::ParametersCallback CreateNetLogSSLErrorCallback(int net_error,
|
| + int ssl_lib_error) {
|
| + return base::Bind(&NetLogSSLErrorCallback, net_error, ssl_lib_error);
|
| +}
|
| +
|
| } // namespace net
|
|
|