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

Side by Side Diff: content/public/test/test_host_resolver.h

Issue 2837813004: Sync the browser test host resolver with the network process before a test runs. (Closed)
Patch Set: review comments Created 3 years, 8 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
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | content/public/test/test_host_resolver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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 CONTENT_PUBLIC_TEST_TEST_HOST_RESOLVER_H_
6 #define CONTENT_PUBLIC_TEST_TEST_HOST_RESOLVER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10
11 namespace net {
12 class HostResolverProc;
13 class RuleBasedHostResolverProc;
14 class ScopedDefaultHostResolverProc;
15 }
16
17 namespace content {
18 class TestHostResolver {
19 public:
20 TestHostResolver();
21 ~TestHostResolver();
22
23 net::RuleBasedHostResolverProc* host_resolver() {
24 return rule_based_resolver_.get();
25 }
26
27 private:
28 // Host resolver used during tests.
29 scoped_refptr<net::HostResolverProc> local_resolver_;
30 scoped_refptr<net::RuleBasedHostResolverProc> rule_based_resolver_;
31 std::unique_ptr<net::ScopedDefaultHostResolverProc>
32 scoped_local_host_resolver_proc_;
33
34 DISALLOW_COPY_AND_ASSIGN(TestHostResolver);
35 };
36
37 } // namespace content
38
39 #endif // CONTENT_PUBLIC_TEST_TEST_HOST_RESOLVER_H_
OLDNEW
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | content/public/test/test_host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698