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

Unified Diff: net/http/http_request_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_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..9d149685a1922379a0357e6f67261b357f83dbd9 100644
--- a/net/http/http_request_headers.cc
+++ b/net/http/http_request_headers.cc
@@ -188,12 +188,12 @@ 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();
+ scoped_ptr<base::ListValue> headers(new base::ListValue());
for (HeaderVector::const_iterator it = headers_.begin();
it != headers_.end(); ++it) {
std::string log_value =
@@ -202,8 +202,8 @@ base::Value* HttpRequestHeaders::NetLogCallback(
base::StringPrintf("%s: %s",
it->key.c_str(), log_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_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