| Index: Source/core/loader/NetworkHintsInterface.h
|
| diff --git a/Source/core/loader/NetworkHintsInterface.h b/Source/core/loader/NetworkHintsInterface.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1932bfc73ccffe5aff04ae4b4b30c49175706c86
|
| --- /dev/null
|
| +++ b/Source/core/loader/NetworkHintsInterface.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2015 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 NetworkHintsInterface_h
|
| +#define NetworkHintsInterface_h
|
| +
|
| +#include "platform/network/NetworkHints.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class NetworkHintsInterface {
|
| +public:
|
| + virtual void dnsPrefetchHost(const String&) const = 0;
|
| + virtual void preconnectHost(const KURL&, const CrossOriginAttributeValue) const = 0;
|
| +};
|
| +
|
| +class NetworkHintsInterfaceImpl : public NetworkHintsInterface {
|
| + void dnsPrefetchHost(const String& host) const override
|
| + {
|
| + prefetchDNS(host);
|
| + }
|
| +
|
| + void preconnectHost(const KURL& host, const CrossOriginAttributeValue crossOrigin) const override
|
| + {
|
| + preconnect(host, crossOrigin);
|
| + }
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif
|
|
|