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

Side by Side Diff: net/ssl/openssl_ssl_util.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/tools/gdig/gdig.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ssl/openssl_ssl_util.h" 5 #include "net/ssl/openssl_ssl_util.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include <openssl/err.h> 9 #include <openssl/err.h>
10 #include <openssl/ssl.h> 10 #include <openssl/ssl.h>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 default: 149 default:
150 LOG(WARNING) << "Unmapped error reason: " << ERR_GET_REASON(error_code); 150 LOG(WARNING) << "Unmapped error reason: " << ERR_GET_REASON(error_code);
151 return ERR_SSL_PROTOCOL_ERROR; 151 return ERR_SSL_PROTOCOL_ERROR;
152 } 152 }
153 } 153 }
154 154
155 base::Value* NetLogOpenSSLErrorCallback(int net_error, 155 base::Value* NetLogOpenSSLErrorCallback(int net_error,
156 int ssl_error, 156 int ssl_error,
157 const OpenSSLErrorInfo& error_info, 157 const OpenSSLErrorInfo& error_info,
158 NetLog::LogLevel /* log_level */) { 158 NetLogCaptureMode /* capture_mode */) {
159 base::DictionaryValue* dict = new base::DictionaryValue(); 159 base::DictionaryValue* dict = new base::DictionaryValue();
160 dict->SetInteger("net_error", net_error); 160 dict->SetInteger("net_error", net_error);
161 dict->SetInteger("ssl_error", ssl_error); 161 dict->SetInteger("ssl_error", ssl_error);
162 if (error_info.error_code != 0) { 162 if (error_info.error_code != 0) {
163 dict->SetInteger("error_lib", ERR_GET_LIB(error_info.error_code)); 163 dict->SetInteger("error_lib", ERR_GET_LIB(error_info.error_code));
164 dict->SetInteger("error_reason", ERR_GET_REASON(error_info.error_code)); 164 dict->SetInteger("error_reason", ERR_GET_REASON(error_info.error_code));
165 } 165 }
166 if (error_info.file != NULL) 166 if (error_info.file != NULL)
167 dict->SetString("file", error_info.file); 167 dict->SetString("file", error_info.file);
168 if (error_info.line != 0) 168 if (error_info.line != 0)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback( 235 NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback(
236 int net_error, 236 int net_error,
237 int ssl_error, 237 int ssl_error,
238 const OpenSSLErrorInfo& error_info) { 238 const OpenSSLErrorInfo& error_info) {
239 return base::Bind(&NetLogOpenSSLErrorCallback, 239 return base::Bind(&NetLogOpenSSLErrorCallback,
240 net_error, ssl_error, error_info); 240 net_error, ssl_error, error_info);
241 } 241 }
242 242
243 } // namespace net 243 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/tools/gdig/gdig.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698