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

Unified Diff: net/http/http_response_headers.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.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 69a0aa854440630fffd7572b9fc23250718c6047..0162efd8ebde56137b4f97e0b106488aa8d9c23c 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1391,10 +1391,10 @@ bool HttpResponseHeaders::GetContentRange(int64* first_byte_position,
return true;
}
-base::Value* HttpResponseHeaders::NetLogCallback(
+scoped_ptr<base::Value> HttpResponseHeaders::NetLogCallback(
NetLogCaptureMode capture_mode) const {
- base::DictionaryValue* dict = new base::DictionaryValue();
- base::ListValue* headers = new base::ListValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ scoped_ptr<base::ListValue> headers(new base::ListValue());
headers->Append(new base::StringValue(GetStatusLine()));
void* iterator = NULL;
std::string name;
@@ -1409,8 +1409,8 @@ base::Value* HttpResponseHeaders::NetLogCallback(
base::StringPrintf("%s: %s", escaped_name.c_str(),
escaped_value.c_str())));
}
- dict->Set("headers", headers);
- return dict;
+ dict->Set("headers", headers.Pass());
+ return dict.Pass();
}
// static
« no previous file with comments | « net/http/http_response_headers.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698