mock_resource_context.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CONTENT_PUBLIC_TEST_MOCK_RESOURCE_CONTEXT_H_ 6#define CONTENT_PUBLIC_TEST_MOCK_RESOURCE_CONTEXT_H_ 7 8#include "base/basictypes.h" 9#include "base/compiler_specific.h" 10#include "base/memory/scoped_ptr.h" 11#include "content/public/browser/resource_context.h" 12 13namespace content { 14 15class MockResourceContext : public ResourceContext { 16 public: 17 MockResourceContext(); 18 virtual ~MockResourceContext(); 19 20 // ResourceContext implementation: 21 virtual net::HostResolver* GetHostResolver() OVERRIDE; 22 virtual net::URLRequestContext* GetRequestContext() OVERRIDE; 23 24 private: 25 scoped_ptr<net::URLRequestContext> test_request_context_; 26 27 DISALLOW_COPY_AND_ASSIGN(MockResourceContext); 28}; 29 30} // namespace content 31 32#endif // CONTENT_PUBLIC_TEST_MOCK_RESOURCE_CONTEXT_H_ 33