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

Unified Diff: net/http/http_network_transaction.cc

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format 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
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 598a51d2d28890d62d1364b6a998429ee21ebcc1..c8b82267764598de6ef5785aa1b72eac78bca4ad 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -93,30 +93,30 @@ void ProcessAlternateProtocol(
*session);
}
-base::Value* NetLogSSLVersionFallbackCallback(
+scoped_ptr<base::Value> NetLogSSLVersionFallbackCallback(
const GURL* url,
int net_error,
SSLFailureState ssl_failure_state,
uint16 version_before,
uint16 version_after,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("host_and_port", GetHostAndPort(*url));
dict->SetInteger("net_error", net_error);
dict->SetInteger("ssl_failure_state", ssl_failure_state);
dict->SetInteger("version_before", version_before);
dict->SetInteger("version_after", version_after);
- return dict;
+ return dict.Pass();
}
-base::Value* NetLogSSLCipherFallbackCallback(
+scoped_ptr<base::Value> NetLogSSLCipherFallbackCallback(
const GURL* url,
int net_error,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("host_and_port", GetHostAndPort(*url));
dict->SetInteger("net_error", net_error);
- return dict;
+ return dict.Pass();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698