| Index: net/socket/nss_ssl_util.cc
|
| diff --git a/net/socket/nss_ssl_util.cc b/net/socket/nss_ssl_util.cc
|
| index e98193b55334742ab696526c9b81d8298927a38a..ed4e84cd861baebe378d72fb48a06167d3fccd4a 100644
|
| --- a/net/socket/nss_ssl_util.cc
|
| +++ b/net/socket/nss_ssl_util.cc
|
| @@ -79,14 +79,15 @@ size_t CiphersCopy(const uint16* in, uint16* out) {
|
| }
|
| }
|
|
|
| -base::Value* NetLogSSLErrorCallback(int net_error,
|
| - int ssl_lib_error,
|
| - NetLogCaptureMode /* capture_mode */) {
|
| - base::DictionaryValue* dict = new base::DictionaryValue();
|
| +scoped_ptr<base::Value> NetLogSSLErrorCallback(
|
| + int net_error,
|
| + int ssl_lib_error,
|
| + NetLogCaptureMode /* capture_mode */) {
|
| + scoped_ptr<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;
|
| + return dict.Pass();
|
| }
|
|
|
| class NSSSSLInitSingleton {
|
| @@ -381,17 +382,17 @@ int MapNSSError(PRErrorCode err) {
|
| // Returns parameters to attach to the NetLog when we receive an error in
|
| // response to a call to an NSS function. Used instead of
|
| // NetLogSSLErrorCallback with events of type TYPE_SSL_NSS_ERROR.
|
| -base::Value* NetLogSSLFailedNSSFunctionCallback(
|
| +scoped_ptr<base::Value> NetLogSSLFailedNSSFunctionCallback(
|
| const char* function,
|
| const char* param,
|
| int ssl_lib_error,
|
| NetLogCaptureMode /* capture_mode */) {
|
| - base::DictionaryValue* dict = new base::DictionaryValue();
|
| + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
|
| dict->SetString("function", function);
|
| if (param[0] != '\0')
|
| dict->SetString("param", param);
|
| dict->SetInteger("ssl_lib_error", ssl_lib_error);
|
| - return dict;
|
| + return dict.Pass();
|
| }
|
|
|
| void LogFailedNSSFunction(const BoundNetLog& net_log,
|
| @@ -399,15 +400,14 @@ void LogFailedNSSFunction(const BoundNetLog& net_log,
|
| const char* param) {
|
| DCHECK(function);
|
| DCHECK(param);
|
| - net_log.AddEvent(
|
| - NetLog::TYPE_SSL_NSS_ERROR,
|
| - base::Bind(&NetLogSSLFailedNSSFunctionCallback,
|
| - function, param, PR_GetError()));
|
| + net_log.AddEvent(NetLog::TYPE_SSL_NSS_ERROR,
|
| + base::Bind(NetLogSSLFailedNSSFunctionCallback, function,
|
| + param, PR_GetError()));
|
| }
|
|
|
| NetLog::ParametersCallback CreateNetLogSSLErrorCallback(int net_error,
|
| int ssl_lib_error) {
|
| - return base::Bind(&NetLogSSLErrorCallback, net_error, ssl_lib_error);
|
| + return base::Bind(NetLogSSLErrorCallback, net_error, ssl_lib_error);
|
| }
|
|
|
| } // namespace net
|
|
|