OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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 #include "net/base/test_host_resolver_observer.h" | |
6 | |
7 namespace net { | |
8 | |
9 bool operator==(const HostResolver::RequestInfo& a, | |
10 const HostResolver::RequestInfo& b) { | |
11 return a.hostname() == b.hostname() && | |
12 a.port() == b.port() && | |
13 a.allow_cached_response() == b.allow_cached_response() && | |
14 a.priority() == b.priority() && | |
15 a.is_speculative() == b.is_speculative() && | |
16 a.referrer() == b.referrer(); | |
17 } | |
18 | |
19 TestHostResolverObserver::TestHostResolverObserver() { | |
20 } | |
21 | |
22 TestHostResolverObserver::~TestHostResolverObserver() { | |
23 } | |
24 | |
25 void TestHostResolverObserver::OnStartResolution( | |
26 int id, | |
27 const HostResolver::RequestInfo& info) { | |
28 start_log.push_back(StartOrCancelEntry(id, info)); | |
29 } | |
30 | |
31 void TestHostResolverObserver::OnFinishResolutionWithStatus( | |
32 int id, | |
33 bool was_resolved, | |
34 const HostResolver::RequestInfo& info) { | |
35 finish_log.push_back(FinishEntry(id, was_resolved, info)); | |
36 } | |
37 | |
38 void TestHostResolverObserver::OnCancelResolution( | |
39 int id, | |
40 const HostResolver::RequestInfo& info) { | |
41 cancel_log.push_back(StartOrCancelEntry(id, info)); | |
42 } | |
43 | |
44 } // namespace | |
OLD | NEW |