Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: components/network_hints/renderer/prescient_networking_dispatcher.h

Issue 899883004: Added chrome-side support for link rel=preconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed formatting nit Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ 5 #ifndef COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_
6 #define COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ 6 #define COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/network_hints/renderer/renderer_dns_prefetch.h" 9 #include "components/network_hints/renderer/renderer_dns_prefetch.h"
10 #include "components/network_hints/renderer/renderer_preconnect.h"
10 #include "third_party/WebKit/public/platform/WebPrescientNetworking.h" 11 #include "third_party/WebKit/public/platform/WebPrescientNetworking.h"
11 12
12 namespace network_hints { 13 namespace network_hints {
13 14
14 // The main entry point from blink for sending DNS prefetch requests to the 15 // The main entry point from blink for sending DNS prefetch requests to the
15 // network stack. 16 // network stack.
16 class PrescientNetworkingDispatcher : public blink::WebPrescientNetworking { 17 class PrescientNetworkingDispatcher : public blink::WebPrescientNetworking {
17 public: 18 public:
18 PrescientNetworkingDispatcher(); 19 PrescientNetworkingDispatcher();
19 ~PrescientNetworkingDispatcher() override; 20 ~PrescientNetworkingDispatcher() override;
20 21
21 void prefetchDNS(const blink::WebString& hostname) override; 22 void prefetchDNS(const blink::WebString& hostname) override;
23 void preconnect(const blink::WebURL& url) override;
22 24
23 private: 25 private:
24 network_hints::RendererDnsPrefetch dns_prefetch_; 26 network_hints::RendererDnsPrefetch dns_prefetch_;
27 network_hints::RendererPreconnect preconnect_;
25 28
26 DISALLOW_COPY_AND_ASSIGN(PrescientNetworkingDispatcher); 29 DISALLOW_COPY_AND_ASSIGN(PrescientNetworkingDispatcher);
27 }; 30 };
28 31
29 } // namespace network_hints 32 } // namespace network_hints
30 33
31 #endif // COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_ 34 #endif // COMPONENTS_NETWORK_HINTS_RENDERER_PRESCIENT_NETWORKING_DISPATCHER_H_
OLDNEW
« no previous file with comments | « components/network_hints/renderer/BUILD.gn ('k') | components/network_hints/renderer/prescient_networking_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698