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

Unified Diff: net/ftp/ftp_ctrl_response_buffer.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/filter/sdch_filter.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_ctrl_response_buffer.cc
diff --git a/net/ftp/ftp_ctrl_response_buffer.cc b/net/ftp/ftp_ctrl_response_buffer.cc
index 36486b7060980fcc0cc4e37cf1541c21d4d07f7a..06ad02a54ff11b55a397553c3a6900d6e5543e98 100644
--- a/net/ftp/ftp_ctrl_response_buffer.cc
+++ b/net/ftp/ftp_ctrl_response_buffer.cc
@@ -79,15 +79,16 @@ int FtpCtrlResponseBuffer::ConsumeData(const char* data, int data_length) {
namespace {
-base::Value* NetLogFtpCtrlResponseCallback(const FtpCtrlResponse* response,
- NetLogCaptureMode capture_mode) {
- base::ListValue* lines = new base::ListValue();
+scoped_ptr<base::Value> NetLogFtpCtrlResponseCallback(
+ const FtpCtrlResponse* response,
+ NetLogCaptureMode capture_mode) {
+ scoped_ptr<base::ListValue> lines(new base::ListValue());
lines->AppendStrings(response->lines);
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("status_code", response->status_code);
- dict->Set("lines", lines);
- return dict;
+ dict->Set("lines", lines.Pass());
+ return dict.Pass();
}
} // namespace
@@ -97,7 +98,7 @@ FtpCtrlResponse FtpCtrlResponseBuffer::PopResponse() {
responses_.pop();
net_log_.AddEvent(NetLog::TYPE_FTP_CONTROL_RESPONSE,
- base::Bind(&NetLogFtpCtrlResponseCallback, &result));
+ base::Bind(NetLogFtpCtrlResponseCallback, &result));
return result;
}
« no previous file with comments | « net/filter/sdch_filter.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698