Fix waterfall bots to not use fastbuild and add presubmit validation.
[chromium-blink-merge.git] / components / network_hints / renderer / prescient_networking_dispatcher.h
blob1810aa03104b9056ff6c986f3ab78261d5b50182
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 #ifndef COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_
6 #define COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_
8 #include "base/macros.h"
9 #include "components/network_hints/renderer/renderer_dns_prefetch.h"
10 #include "components/network_hints/renderer/renderer_preconnect.h"
11 #include "third_party/WebKit/public/platform/WebPrescientNetworking.h"
13 namespace network_hints {
15 // The main entry point from blink for sending DNS prefetch requests to the
16 // network stack.
17 class PrescientNetworkingDispatcher : public blink::WebPrescientNetworking {
18 public:
19 PrescientNetworkingDispatcher();
20 ~PrescientNetworkingDispatcher() override;
22 virtual void prefetchDNS(const blink::WebString& hostname) override;
23 // TODO(yoav): Remove the old version of the API
24 virtual void preconnect(const blink::WebURL& url);
25 virtual void preconnect(const blink::WebURL& url,
26 const bool allow_credentials) override;
28 private:
29 network_hints::RendererDnsPrefetch dns_prefetch_;
30 network_hints::RendererPreconnect preconnect_;
32 DISALLOW_COPY_AND_ASSIGN(PrescientNetworkingDispatcher);
35 } // namespace network_hints
37 #endif // COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_