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

Unified Diff: net/spdy/spdy_stream.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/spdy/spdy_session.cc ('k') | net/ssl/openssl_ssl_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 97d0c9d1cea423537860570fe61271d33880cf83..55522c2adf80c0a7d0e8763101ec0dfc82785b79 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -20,28 +20,28 @@ namespace net {
namespace {
-base::Value* NetLogSpdyStreamErrorCallback(
+scoped_ptr<base::Value> NetLogSpdyStreamErrorCallback(
SpdyStreamId stream_id,
int status,
const std::string* description,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("stream_id", static_cast<int>(stream_id));
dict->SetInteger("status", status);
dict->SetString("description", *description);
- return dict;
+ return dict.Pass();
}
-base::Value* NetLogSpdyStreamWindowUpdateCallback(
+scoped_ptr<base::Value> NetLogSpdyStreamWindowUpdateCallback(
SpdyStreamId stream_id,
int32 delta,
int32 window_size,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("stream_id", stream_id);
dict->SetInteger("delta", delta);
dict->SetInteger("window_size", window_size);
- return dict;
+ return dict.Pass();
}
bool ContainsUppercaseAscii(const std::string& str) {
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/ssl/openssl_ssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698