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

Unified Diff: net/http/http_request_headers.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_request_headers.h ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_request_headers.cc
diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc
index eaeec0deacbbcc79f2bc31f6b51e452cd25a6fcc..004d0659512c62ec3d35b40d1abd6926171cfe8b 100644
--- a/net/http/http_request_headers.cc
+++ b/net/http/http_request_headers.cc
@@ -188,10 +188,10 @@ std::string HttpRequestHeaders::ToString() const {
return output;
}
-base::Value* HttpRequestHeaders::NetLogCallback(
+scoped_ptr<base::Value> HttpRequestHeaders::NetLogCallback(
const std::string* request_line,
NetLogCaptureMode capture_mode) const {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("line", *request_line);
base::ListValue* headers = new base::ListValue();
for (HeaderVector::const_iterator it = headers_.begin();
@@ -203,7 +203,7 @@ base::Value* HttpRequestHeaders::NetLogCallback(
it->key.c_str(), log_value.c_str())));
}
dict->Set("headers", headers);
- return dict;
+ return dict.Pass();
}
// static
« no previous file with comments | « net/http/http_request_headers.h ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698