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

Side by Side Diff: net/socket/nss_ssl_util.cc

Issue 15662008: Make net and ipc explicitly use the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/client_socket_pool_manager_impl.cc ('k') | net/socket/socket_net_log_params.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 (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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 LOG(WARNING) << "Unknown error " << err << " mapped to net::ERR_FAILED"; 220 LOG(WARNING) << "Unknown error " << err << " mapped to net::ERR_FAILED";
221 return ERR_FAILED; 221 return ERR_FAILED;
222 } 222 }
223 } 223 }
224 } 224 }
225 225
226 // Returns parameters to attach to the NetLog when we receive an error in 226 // Returns parameters to attach to the NetLog when we receive an error in
227 // response to a call to an NSS function. Used instead of 227 // response to a call to an NSS function. Used instead of
228 // NetLogSSLErrorCallback with events of type TYPE_SSL_NSS_ERROR. 228 // NetLogSSLErrorCallback with events of type TYPE_SSL_NSS_ERROR.
229 Value* NetLogSSLFailedNSSFunctionCallback( 229 base::Value* NetLogSSLFailedNSSFunctionCallback(
230 const char* function, 230 const char* function,
231 const char* param, 231 const char* param,
232 int ssl_lib_error, 232 int ssl_lib_error,
233 NetLog::LogLevel /* log_level */) { 233 NetLog::LogLevel /* log_level */) {
234 DictionaryValue* dict = new DictionaryValue(); 234 base::DictionaryValue* dict = new base::DictionaryValue();
235 dict->SetString("function", function); 235 dict->SetString("function", function);
236 if (param[0] != '\0') 236 if (param[0] != '\0')
237 dict->SetString("param", param); 237 dict->SetString("param", param);
238 dict->SetInteger("ssl_lib_error", ssl_lib_error); 238 dict->SetInteger("ssl_lib_error", ssl_lib_error);
239 return dict; 239 return dict;
240 } 240 }
241 241
242 void LogFailedNSSFunction(const BoundNetLog& net_log, 242 void LogFailedNSSFunction(const BoundNetLog& net_log,
243 const char* function, 243 const char* function,
244 const char* param) { 244 const char* param) {
245 DCHECK(function); 245 DCHECK(function);
246 DCHECK(param); 246 DCHECK(param);
247 net_log.AddEvent( 247 net_log.AddEvent(
248 NetLog::TYPE_SSL_NSS_ERROR, 248 NetLog::TYPE_SSL_NSS_ERROR,
249 base::Bind(&NetLogSSLFailedNSSFunctionCallback, 249 base::Bind(&NetLogSSLFailedNSSFunctionCallback,
250 function, param, PR_GetError())); 250 function, param, PR_GetError()));
251 } 251 }
252 252
253 } // namespace net 253 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_manager_impl.cc ('k') | net/socket/socket_net_log_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698