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

Side by Side Diff: components/network_hints/browser/network_hints_impl.h

Issue 2179693002: Revert of Convert network hints to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
(Empty)
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.
4
5 #ifndef COMPONENTS_NETWORK_HINTS_BROWSER_NETWORK_HINTS_MESSAGE_FILTER_H_
6 #define COMPONENTS_NETWORK_HINTS_BROWSER_NETWORK_HINTS_MESSAGE_FILTER_H_
7
8 #include "base/macros.h"
9 #include "components/network_hints/public/interfaces/network_hints.mojom.h"
10 #include "mojo/public/cpp/bindings/binding_set.h"
11
12 namespace net {
13 class HostResolver;
14 }
15
16 namespace network_hints {
17 struct LookupRequest;
18
19 // Simple browser-side handler for DNS prefetch requests.
20 // Passes prefetch requests to the provided net::HostResolver.
21 // Each renderer process requires its own filter.
22 class NetworkHintsImpl : public network_hints::mojom::NetworkHints {
23 public:
24 explicit NetworkHintsImpl(net::HostResolver* host_resolver);
25 ~NetworkHintsImpl() override;
26
27 void Bind(mojo::InterfaceRequest<mojom::NetworkHints> request);
28
29 private:
30 // network_hints::mojom::NetworkHints implementation:
31 void DNSPrefetch(const LookupRequest& lookup_request) override;
32 void Preconnect(const GURL& url,
33 bool allow_credentials,
34 int32_t count) override {}
35
36 net::HostResolver* host_resolver_;
37
38 mojo::BindingSet<mojom::NetworkHints> bindings_;
39
40 DISALLOW_COPY_AND_ASSIGN(NetworkHintsImpl);
41 };
42
43 } // namespace network_hints
44
45 #endif // COMPONENTS_NETWORK_HINTS_BROWSER_NETWORK_HINTS_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « components/network_hints/browser/DEPS ('k') | components/network_hints/browser/network_hints_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698