| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/socket/nss_ssl_util.h" | 5 #include "net/socket/nss_ssl_util.h" |
| 6 | 6 |
| 7 #include <nss.h> | 7 #include <nss.h> |
| 8 #include <secerr.h> | 8 #include <secerr.h> |
| 9 #include <ssl.h> | 9 #include <ssl.h> |
| 10 #include <sslerr.h> | 10 #include <sslerr.h> |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 virtual Value* ToValue() const { | 243 virtual Value* ToValue() const { |
| 244 DictionaryValue* dict = new DictionaryValue(); | 244 DictionaryValue* dict = new DictionaryValue(); |
| 245 dict->SetString("function", function_); | 245 dict->SetString("function", function_); |
| 246 if (!param_.empty()) | 246 if (!param_.empty()) |
| 247 dict->SetString("param", param_); | 247 dict->SetString("param", param_); |
| 248 dict->SetInteger("ssl_lib_error", ssl_lib_error_); | 248 dict->SetInteger("ssl_lib_error", ssl_lib_error_); |
| 249 return dict; | 249 return dict; |
| 250 } | 250 } |
| 251 | 251 |
| 252 private: | 252 private: |
| 253 virtual ~SSLFailedNSSFunctionParams() {} |
| 254 |
| 253 const std::string function_; | 255 const std::string function_; |
| 254 const std::string param_; | 256 const std::string param_; |
| 255 const PRErrorCode ssl_lib_error_; | 257 const PRErrorCode ssl_lib_error_; |
| 256 }; | 258 }; |
| 257 | 259 |
| 258 void LogFailedNSSFunction(const BoundNetLog& net_log, | 260 void LogFailedNSSFunction(const BoundNetLog& net_log, |
| 259 const char* function, | 261 const char* function, |
| 260 const char* param) { | 262 const char* param) { |
| 261 net_log.AddEvent( | 263 net_log.AddEvent( |
| 262 NetLog::TYPE_SSL_NSS_ERROR, | 264 NetLog::TYPE_SSL_NSS_ERROR, |
| 263 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param))); | 265 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param))); |
| 264 } | 266 } |
| 265 | 267 |
| 266 } // namespace net | 268 } // namespace net |
| OLD | NEW |