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

Unified Diff: webkit/appcache/appcache_update_job_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: webkit/appcache/appcache_update_job_unittest.cc
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index 604eaf1b8c9a77ce4e0b22dce3b6da8d7e3b31b9..123a563f59fc4b4e7a32e7afb4c3c7e5825c492b 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -536,8 +536,8 @@ class IOThread : public base::Thread {
Stop();
}
- const scoped_refptr<net::URLRequestContext>& request_context() {
- return request_context_;
+ net::URLRequestContext* request_context() {
+ return request_context_.get();
}
void SetNewJobFactory(net::URLRequestJobFactory* job_factory) {
@@ -550,18 +550,18 @@ class IOThread : public base::Thread {
job_factory_.reset(new net::URLRequestJobFactory);
job_factory_->SetProtocolHandler("http", new MockHttpServerJobFactory);
job_factory_->SetProtocolHandler("https", new MockHttpServerJobFactory);
- request_context_ = new TestURLRequestContext();
+ request_context_.reset(new TestURLRequestContext());
request_context_->set_job_factory(job_factory_.get());
}
virtual void CleanUp() {
- request_context_ = NULL;
+ request_context_.reset();
job_factory_.reset();
}
private:
scoped_ptr<net::URLRequestJobFactory> job_factory_;
- scoped_refptr<net::URLRequestContext> request_context_;
+ scoped_ptr<net::URLRequestContext> request_context_;
};
class AppCacheUpdateJobTest : public testing::Test,

Powered by Google App Engine
This is Rietveld 408576698