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

Unified Diff: chrome/service/cloud_print/cloud_print_url_fetcher_unittest.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/browser/sync/glue/http_bridge.cc ('k') | chrome/service/net/service_url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
index 63589dfa282c5e75b9db97f2db143631d109e06c..e0279a7067f7060abe08ce77f5d566e473b9eebd 100644
--- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
@@ -39,8 +39,8 @@ class TrackingTestURLRequestContextGetter
}
virtual TestURLRequestContext* GetURLRequestContext() OVERRIDE {
- if (!context_) {
- context_ = new TestURLRequestContext(true);
+ if (!context_.get()) {
+ context_.reset(new TestURLRequestContext(true));
context_->set_throttler_manager(throttler_manager_);
context_->Init();
}
@@ -55,7 +55,7 @@ class TrackingTestURLRequestContextGetter
private:
// Not owned here.
net::URLRequestThrottlerManager* throttler_manager_;
- scoped_refptr<TestURLRequestContext> context_;
+ scoped_ptr<TestURLRequestContext> context_;
};
class TestCloudPrintURLFetcher : public CloudPrintURLFetcher {
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.cc ('k') | chrome/service/net/service_url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698