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