OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/dns/mock_host_resolver.h" | 5 #include "net/dns/mock_host_resolver.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "base/strings/string_split.h" |
14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
15 #include "base/strings/string_split.h" | |
16 #include "base/threading/platform_thread.h" | 16 #include "base/threading/platform_thread.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
19 #include "net/base/test_completion_callback.h" | 19 #include "net/base/test_completion_callback.h" |
20 #include "net/dns/host_cache.h" | 20 #include "net/dns/host_cache.h" |
21 | 21 |
22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
23 #include "net/base/winsock_init.h" | 23 #include "net/base/winsock_init.h" |
24 #endif | 24 #endif |
25 | 25 |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 CHECK_EQ(old_proc, current_proc_); | 430 CHECK_EQ(old_proc, current_proc_); |
431 } | 431 } |
432 | 432 |
433 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) { | 433 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) { |
434 current_proc_ = proc; | 434 current_proc_ = proc; |
435 previous_proc_ = HostResolverProc::SetDefault(current_proc_.get()); | 435 previous_proc_ = HostResolverProc::SetDefault(current_proc_.get()); |
436 current_proc_->SetLastProc(previous_proc_.get()); | 436 current_proc_->SetLastProc(previous_proc_.get()); |
437 } | 437 } |
438 | 438 |
439 } // namespace net | 439 } // namespace net |
OLD | NEW |