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

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: More fixes Created 8 years, 8 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/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 {

Powered by Google App Engine
This is Rietveld 408576698