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

Unified Diff: net/cert/multi_threaded_cert_verifier.cc

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/multi_log_ct_verifier.cc ('k') | net/cert/x509_certificate_net_log_param.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/multi_threaded_cert_verifier.cc
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index 1bfb373b4698bea9c31ecdf9309c55cfa059390d..05b3dcd105224e906cbfe13c2ea53996082db655 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -81,9 +81,10 @@ const unsigned kMaxCacheEntries = 256;
// The number of seconds to cache entries.
const unsigned kTTLSecs = 1800; // 30 minutes.
-base::Value* CertVerifyResultCallback(const CertVerifyResult& verify_result,
- NetLogCaptureMode capture_mode) {
- base::DictionaryValue* results = new base::DictionaryValue();
+scoped_ptr<base::Value> CertVerifyResultCallback(
+ const CertVerifyResult& verify_result,
+ NetLogCaptureMode capture_mode) {
+ scoped_ptr<base::DictionaryValue> results(new base::DictionaryValue());
results->SetBoolean("has_md5", verify_result.has_md5);
results->SetBoolean("has_md2", verify_result.has_md2);
results->SetBoolean("has_md4", verify_result.has_md4);
@@ -98,16 +99,16 @@ base::Value* CertVerifyResultCallback(const CertVerifyResult& verify_result,
NetLogX509CertificateCallback(verify_result.verified_cert.get(),
capture_mode));
- base::ListValue* hashes = new base::ListValue();
+ scoped_ptr<base::ListValue> hashes(new base::ListValue());
for (std::vector<HashValue>::const_iterator it =
verify_result.public_key_hashes.begin();
it != verify_result.public_key_hashes.end();
++it) {
hashes->AppendString(it->ToString());
}
- results->Set("public_key_hashes", hashes);
+ results->Set("public_key_hashes", hashes.Pass());
- return results;
+ return results.Pass();
}
} // namespace
« no previous file with comments | « net/cert/multi_log_ct_verifier.cc ('k') | net/cert/x509_certificate_net_log_param.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698