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 #include "content/public/test/mock_resource_context.h" 6 7 #include "net/url_request/url_request_context.h" 8 9 namespace content { 10 11 MockResourceContext::MockResourceContext() 12 : test_request_context_(NULL) { 13 } 14 15 MockResourceContext::MockResourceContext( 16 net::URLRequestContext* test_request_context) 17 : test_request_context_(test_request_context) { 18 } 19 20 MockResourceContext::~MockResourceContext() {} 21 22 net::HostResolver* MockResourceContext::GetHostResolver() { 23 return NULL; 24 } 25 26 net::URLRequestContext* MockResourceContext::GetRequestContext() { 27 CHECK(test_request_context_); 28 return test_request_context_; 29 } 30 31 } // namespace content 32