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

Side by Side Diff: net/base/mock_host_resolver.cc

Issue 569035: Remove the HostResolver::Shutdown() method.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and address comment Created 10 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/base/mock_host_resolver.h ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/base/mock_host_resolver.h" 5 #include "net/base/mock_host_resolver.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/platform_thread.h" 8 #include "base/platform_thread.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "googleurl/src/url_canon_ip.h" 10 #include "googleurl/src/url_canon_ip.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 void MockHostResolverBase::AddObserver(Observer* observer) { 61 void MockHostResolverBase::AddObserver(Observer* observer) {
62 impl_->AddObserver(observer); 62 impl_->AddObserver(observer);
63 } 63 }
64 64
65 void MockHostResolverBase::RemoveObserver(Observer* observer) { 65 void MockHostResolverBase::RemoveObserver(Observer* observer) {
66 impl_->RemoveObserver(observer); 66 impl_->RemoveObserver(observer);
67 } 67 }
68 68
69 void MockHostResolverBase::Shutdown() {
70 impl_->Shutdown();
71 }
72
73 void MockHostResolverBase::Reset(HostResolverProc* interceptor) { 69 void MockHostResolverBase::Reset(HostResolverProc* interceptor) {
74 synchronous_mode_ = false; 70 synchronous_mode_ = false;
75 71
76 // At the root of the chain, map everything to localhost. 72 // At the root of the chain, map everything to localhost.
77 scoped_refptr<RuleBasedHostResolverProc> catchall = 73 scoped_refptr<RuleBasedHostResolverProc> catchall =
78 new RuleBasedHostResolverProc(NULL); 74 new RuleBasedHostResolverProc(NULL);
79 catchall->AddRule("*", "127.0.0.1"); 75 catchall->AddRule("*", "127.0.0.1");
80 76
81 // Next add a rules-based layer the use controls. 77 // Next add a rules-based layer the use controls.
82 rules_ = new RuleBasedHostResolverProc(catchall); 78 rules_ = new RuleBasedHostResolverProc(catchall);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 CHECK(old_proc == current_proc_); 227 CHECK(old_proc == current_proc_);
232 } 228 }
233 229
234 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) { 230 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) {
235 current_proc_ = proc; 231 current_proc_ = proc;
236 previous_proc_ = HostResolverProc::SetDefault(current_proc_); 232 previous_proc_ = HostResolverProc::SetDefault(current_proc_);
237 current_proc_->SetLastProc(previous_proc_); 233 current_proc_->SetLastProc(previous_proc_);
238 } 234 }
239 235
240 } // namespace net 236 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mock_host_resolver.h ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698