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

Unified Diff: chrome/test/base/testing_profile.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
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | content/browser/browser_process_sub_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index f30e1994d20a58275a533eee6bc1dc7550685f14..ea850b256551fa22b465ca419604f171240c460c 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -99,7 +99,6 @@ class TestExtensionURLRequestContext : public net::URLRequestContext {
set_cookie_store(cookie_monster);
}
- private:
virtual ~TestExtensionURLRequestContext() {}
};
@@ -107,8 +106,8 @@ class TestExtensionURLRequestContextGetter
: public net::URLRequestContextGetter {
public:
virtual net::URLRequestContext* GetURLRequestContext() {
- if (!context_)
- context_ = new TestExtensionURLRequestContext();
+ if (!context_.get())
+ context_.reset(new TestExtensionURLRequestContext());
return context_.get();
}
virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const {
@@ -119,7 +118,7 @@ class TestExtensionURLRequestContextGetter
virtual ~TestExtensionURLRequestContextGetter() {}
private:
- scoped_refptr<net::URLRequestContext> context_;
+ scoped_ptr<net::URLRequestContext> context_;
};
ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) {
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | content/browser/browser_process_sub_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698