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

Unified Diff: net/proxy/proxy_service.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/proxy/proxy_script_decider.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service.cc
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 46300e8619276c4b16ec6f2f40d790d89d4c9654..2b12c8e86116ce6a23e90fda3ced314711eb8cb0 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -307,22 +307,23 @@ class ProxyResolverFactoryForPacResult : public ProxyResolverFactory {
};
// Returns NetLog parameters describing a proxy configuration change.
-base::Value* NetLogProxyConfigChangedCallback(
+scoped_ptr<base::Value> NetLogProxyConfigChangedCallback(
const ProxyConfig* old_config,
const ProxyConfig* new_config,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
// The "old_config" is optional -- the first notification will not have
// any "previous" configuration.
if (old_config->is_valid())
dict->Set("old_config", old_config->ToValue());
dict->Set("new_config", new_config->ToValue());
- return dict;
+ return dict.Pass();
}
-base::Value* NetLogBadProxyListCallback(const ProxyRetryInfoMap* retry_info,
- NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+scoped_ptr<base::Value> NetLogBadProxyListCallback(
+ const ProxyRetryInfoMap* retry_info,
+ NetLogCaptureMode /* capture_mode */) {
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
base::ListValue* list = new base::ListValue();
for (ProxyRetryInfoMap::const_iterator iter = retry_info->begin();
@@ -330,16 +331,16 @@ base::Value* NetLogBadProxyListCallback(const ProxyRetryInfoMap* retry_info,
list->Append(new base::StringValue(iter->first));
}
dict->Set("bad_proxy_list", list);
- return dict;
+ return dict.Pass();
}
// Returns NetLog parameters on a successfuly proxy resolution.
-base::Value* NetLogFinishedResolvingProxyCallback(
+scoped_ptr<base::Value> NetLogFinishedResolvingProxyCallback(
const ProxyInfo* result,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("pac_string", result->ToPacString());
- return dict;
+ return dict.Pass();
}
#if defined(OS_CHROMEOS)
« no previous file with comments | « net/proxy/proxy_script_decider.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698