summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorpauljensen <pauljensen@chromium.org>2015-09-01 06:19:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-01 13:20:22 +0000
commit53197db553fa979bcdce9836f7346fa898d416fe (patch)
tree45fc8c8ce6ebc15797f8d66fd9d57081d654ec2a /cloud_print
parentab0a4acf8457c2d2abee609fbe5342093d43b244 (diff)
downloadchromium_src-53197db553fa979bcdce9836f7346fa898d416fe.zip
chromium_src-53197db553fa979bcdce9836f7346fa898d416fe.tar.gz
chromium_src-53197db553fa979bcdce9836f7346fa898d416fe.tar.bz2
Make UrlRequestContextBuilder take scoped_ptr's when it takes ownership
UrlRequestContextBuilder was already taking ownership in most cases, so it should be taking scoped_ptr's instead of raw pointers. This change should help enforce proper ownership and has already identified two ownership bugs. I'm fixing the ownership bugs (a double-free of ProxyConfigService in Cronet and of NetLog in AwURLRequestContextGetter) in this change also. I'm changing UrlRequestContextBuilder to not take ownership of NetLog however as this conflicts with some other uses of NetLog, like how it's exposed via ContentBrowserClient. BUG=508553 TBR=jam Review URL: https://codereview.chromium.org/1303493002 Cr-Commit-Position: refs/heads/master@{#346637}
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc b/cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc
index 653f854..904ae65 100644
--- a/cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc
+++ b/cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc
@@ -23,9 +23,9 @@ CloudPrintURLRequestContextGetter::GetURLRequestContext() {
net::URLRequestContextBuilder builder;
#if defined(OS_LINUX) || defined(OS_ANDROID)
builder.set_proxy_config_service(
- new net::ProxyConfigServiceFixed(net::ProxyConfig()));
+ make_scoped_ptr(new net::ProxyConfigServiceFixed(net::ProxyConfig())));
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
- context_.reset(builder.Build());
+ context_ = builder.Build().Pass();
}
return context_.get();
}