QUIC - enable persisting of QUICServerInfo (server config) to disk
[chromium-blink-merge.git] / net / socket / ssl_error_params.cc
blob37561f0de48a6c593ca327323b1802fa6a3b9dc6
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
3 // found in the LICENSE file.
5 #include "net/socket/ssl_error_params.h"
7 #include "base/bind.h"
8 #include "base/values.h"
10 namespace net {
12 namespace {
14 base::Value* NetLogSSLErrorCallback(int net_error,
15 int ssl_lib_error,
16 NetLog::LogLevel /* log_level */) {
17 base::DictionaryValue* dict = new base::DictionaryValue();
18 dict->SetInteger("net_error", net_error);
19 if (ssl_lib_error)
20 dict->SetInteger("ssl_lib_error", ssl_lib_error);
21 return dict;
24 } // namespace
26 NetLog::ParametersCallback CreateNetLogSSLErrorCallback(int net_error,
27 int ssl_lib_error) {
28 return base::Bind(&NetLogSSLErrorCallback, net_error, ssl_lib_error);
31 } // namespace net