summaryrefslogtreecommitdiffstats
path: root/net/socket/nss_ssl_util.cc
diff options
context:
space:
mode:
authorestade <estade@chromium.org>2015-05-21 13:59:11 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-21 20:59:42 +0000
commit5e5529d1a3a3fd5b987d2ea5df89b88f4ca4948a (patch)
tree3b0f99488904e4a6a20d914ffa0213732efdb51d /net/socket/nss_ssl_util.cc
parentf5b01f7ac93752dbc654be2b328391d8484e724e (diff)
downloadchromium_src-5e5529d1a3a3fd5b987d2ea5df89b88f4ca4948a.zip
chromium_src-5e5529d1a3a3fd5b987d2ea5df89b88f4ca4948a.tar.gz
chromium_src-5e5529d1a3a3fd5b987d2ea5df89b88f4ca4948a.tar.bz2
Change NetLog::ParametersCallback to return a scoped_ptr.
BUG=479898, 485606 TBR=benjhayden@chromium.org,sclittle@chromium.org Review URL: https://codereview.chromium.org/1149763005 Cr-Commit-Position: refs/heads/master@{#330982}
Diffstat (limited to 'net/socket/nss_ssl_util.cc')
-rw-r--r--net/socket/nss_ssl_util.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/socket/nss_ssl_util.cc b/net/socket/nss_ssl_util.cc
index e98193b..c7bb324 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,