| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ |
| 6 #define CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ | 6 #define CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/browser/resource_context.h" | 10 #include "content/browser/resource_context.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 template <typename T> | 13 template <typename T> |
| 14 struct DefaultLazyInstanceTraits; | 14 struct DefaultLazyInstanceTraits; |
| 15 } // namespace base | 15 } // namespace base |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class MockResourceContext : public ResourceContext { | 19 class MockResourceContext : public ResourceContext { |
| 20 public: | 20 public: |
| 21 static const ResourceContext& GetInstance(); | 21 static const ResourceContext& GetInstance(); |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 friend struct base::DefaultLazyInstanceTraits<MockResourceContext>; | 24 friend struct base::DefaultLazyInstanceTraits<MockResourceContext>; |
| 25 | 25 |
| 26 MockResourceContext(); | 26 MockResourceContext(); |
| 27 ~MockResourceContext(); | 27 virtual ~MockResourceContext(); |
| 28 virtual void EnsureInitialized() const OVERRIDE; | 28 virtual void EnsureInitialized() const OVERRIDE; |
| 29 | 29 |
| 30 const scoped_refptr<net::URLRequestContext> test_request_context_; | 30 const scoped_refptr<net::URLRequestContext> test_request_context_; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace content | 33 } // namespace content |
| 34 | 34 |
| 35 #endif // CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ | 35 #endif // CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ |
| OLD | NEW |