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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1135373002: Updated NetLog::ParametersCallback & all related calbacks returning value as scoped_ptr<base::Value… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_response_headers.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 1172bf1f6dcd3d1f649322cf15b925dcb1ea5c5f..b5de817432d1ef1870e7fd661bb81e31e7ffa5bc 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -44,32 +44,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,
@@ -646,7 +646,7 @@ int HttpStreamFactoryImpl::Job::DoStart() {
net_log_.BeginEvent(
NetLog::TYPE_HTTP_STREAM_JOB,
- base::Bind(&NetLogHttpStreamJobCallback, &request_info_.url, &origin_url_,
+ base::Bind(NetLogHttpStreamJobCallback, &request_info_.url, &origin_url_,
&alternative_service_, priority_));
// Don't connect to restricted ports.
@@ -980,8 +980,7 @@ int HttpStreamFactoryImpl::Job::DoInitConnectionComplete(int result) {
protocol_negotiated_ = SSLClientSocket::NextProtoFromString(proto);
net_log_.AddEvent(
NetLog::TYPE_HTTP_STREAM_REQUEST_PROTO,
- base::Bind(&NetLogHttpStreamProtoCallback,
- status, &proto));
+ base::Bind(NetLogHttpStreamProtoCallback, status, &proto));
if (NextProtoIsSPDY(protocol_negotiated_))
SwitchToSpdyMode();
}
« no previous file with comments | « net/http/http_response_headers.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698