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

Unified Diff: chrome/browser/sync/glue/http_bridge.cc

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 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: chrome/browser/sync/glue/http_bridge.cc
diff --git a/chrome/browser/sync/glue/http_bridge.cc b/chrome/browser/sync/glue/http_bridge.cc
index dc01ebf381b0bd29ff3775cc0d21e0040649c470..e7a217f061a2f45c43b2ca0b2c336b07d5248b3c 100644
--- a/chrome/browser/sync/glue/http_bridge.cc
+++ b/chrome/browser/sync/glue/http_bridge.cc
@@ -35,10 +35,10 @@ HttpBridge::RequestContextGetter::~RequestContextGetter() {}
net::URLRequestContext*
HttpBridge::RequestContextGetter::GetURLRequestContext() {
// Lazily create the context.
- if (!context_) {
+ if (!context_.get()) {
net::URLRequestContext* baseline_context =
baseline_context_getter_->GetURLRequestContext();
- context_ = new RequestContext(baseline_context);
+ context_.reset(new RequestContext(baseline_context));
baseline_context_getter_ = NULL;
}
@@ -46,7 +46,7 @@ HttpBridge::RequestContextGetter::GetURLRequestContext() {
if (is_user_agent_set())
context_->set_user_agent(user_agent_);
- return context_;
+ return context_.get();
}
scoped_refptr<base::MessageLoopProxy>
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.h ('k') | chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698