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

Unified Diff: net/http/http_stream_factory_impl_job.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/http/http_server_properties_impl.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 0bf86a48f509c34bab1536dfb2e70650c3f8043a..29f42078819cf9d70bd74c5b8870549b4f24d4c0 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -45,32 +45,32 @@
namespace net {
// Returns parameters associated with the start of a HTTP stream job.
-base::Value* NetLogHttpStreamJobCallback(
+scoped_ptr<base::Value> NetLogHttpStreamJobCallback(
const GURL* original_url,
const GURL* url,
const AlternativeService* alternative_service,
RequestPriority priority,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("original_url", original_url->GetOrigin().spec());
dict->SetString("url", url->GetOrigin().spec());
dict->SetString("alternative_service", alternative_service->ToString());
dict->SetString("priority", RequestPriorityToString(priority));
- return dict;
+ return dict.Pass();
}
// Returns parameters associated with the Proto (with NPN negotiation) of a HTTP
// stream.
-base::Value* NetLogHttpStreamProtoCallback(
+scoped_ptr<base::Value> NetLogHttpStreamProtoCallback(
const SSLClientSocket::NextProtoStatus status,
const std::string* proto,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("next_proto_status",
SSLClientSocket::NextProtoStatusToString(status));
dict->SetString("proto", *proto);
- return dict;
+ return dict.Pass();
}
HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698