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

Unified Diff: content/test/mock_resource_context.h

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 | « content/shell/shell_url_request_context_getter.cc ('k') | content/test/mock_resource_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/mock_resource_context.h
diff --git a/content/test/mock_resource_context.h b/content/test/mock_resource_context.h
index d25bcd62048dbba86b29cbda7612dd5c645ecdfa..6e8ed09612c98911bbbfc5ec7b8f649b3eb0829d 100644
--- a/content/test/mock_resource_context.h
+++ b/content/test/mock_resource_context.h
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "content/public/browser/resource_context.h"
namespace content {
@@ -16,19 +16,14 @@ namespace content {
class MockResourceContext : public ResourceContext {
public:
MockResourceContext();
- explicit MockResourceContext(net::URLRequestContext* context);
virtual ~MockResourceContext();
- void set_request_context(net::URLRequestContext* context) {
- test_request_context_ = context;
- }
-
// ResourceContext implementation:
virtual net::HostResolver* GetHostResolver() OVERRIDE;
virtual net::URLRequestContext* GetRequestContext() OVERRIDE;
private:
- scoped_refptr<net::URLRequestContext> test_request_context_;
+ scoped_ptr<net::URLRequestContext> test_request_context_;
DISALLOW_COPY_AND_ASSIGN(MockResourceContext);
};
« no previous file with comments | « content/shell/shell_url_request_context_getter.cc ('k') | content/test/mock_resource_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698