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

Side by Side Diff: third_party/WebKit/Source/core/loader/NetworkHintsInterface.h

Issue 2043753002: Declarative resource hints go through mojo IPC to //content Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove gmocking + add another browser test Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 NetworkHintsInterface_h 5 #ifndef NetworkHintsInterface_h
6 #define NetworkHintsInterface_h 6 #define NetworkHintsInterface_h
7 7
8 #include "platform/network/NetworkHints.h" 8 #include "platform/network/NetworkHints.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class NetworkHintsInterface { 12 class NetworkHintsInterface {
13 public: 13 public:
14 virtual void dnsPrefetchHost(const String&) const = 0; 14 virtual void dnsPrefetchHost(const KURL&) const = 0;
15 virtual void preconnectHost(const KURL&, const CrossOriginAttributeValue) co nst = 0; 15 virtual void preconnectHost(const KURL&, const CrossOriginAttributeValue) co nst = 0;
16 }; 16 };
17 17
18 class NetworkHintsInterfaceImpl : public NetworkHintsInterface { 18 class NetworkHintsInterfaceImpl : public NetworkHintsInterface {
19 void dnsPrefetchHost(const String& host) const override 19 void dnsPrefetchHost(const KURL& url) const override
20 { 20 {
21 prefetchDNS(host); 21 prefetchDNS(url);
22 } 22 }
23 23
24 void preconnectHost(const KURL& host, const CrossOriginAttributeValue crossO rigin) const override 24 void preconnectHost(const KURL& host, const CrossOriginAttributeValue crossO rigin) const override
25 { 25 {
26 preconnect(host, crossOrigin); 26 preconnect(host, crossOrigin);
27 } 27 }
28 }; 28 };
29 29
30 } // namespace blink 30 } // namespace blink
31 31
32 #endif 32 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698