Reland the ULONG -> SIZE_T change from 317177
[chromium-blink-merge.git] / extensions / browser / api / dns / host_resolver_wrapper.cc
blob4a9b44ed6af9c23722e22b1a76a673d332e51bc1
1 // Copyright 2014 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.
5 #include "extensions/browser/api/dns/host_resolver_wrapper.h"
7 #include "content/public/browser/resource_context.h"
8 #include "net/dns/host_resolver.h"
10 namespace extensions {
12 HostResolverWrapper::HostResolverWrapper() : resolver_(NULL) {}
14 // static
15 HostResolverWrapper* HostResolverWrapper::GetInstance() {
16 return Singleton<extensions::HostResolverWrapper>::get();
19 net::HostResolver* HostResolverWrapper::GetHostResolver(
20 content::ResourceContext* context) {
21 return resolver_ ? resolver_ : context->GetHostResolver();
24 void HostResolverWrapper::SetHostResolverForTesting(
25 net::HostResolver* mock_resolver) {
26 resolver_ = mock_resolver;
29 } // namespace extensions