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

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

Issue 556094: Add fine grain tracing to HostResolverImpl.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add explicit to ctors 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
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 HostCache* MockHostResolverBase::GetHostCache() {
70 return impl_->GetHostCache();
71 }
72
73 void MockHostResolverBase::Shutdown() { 69 void MockHostResolverBase::Shutdown() {
74 impl_->Shutdown(); 70 impl_->Shutdown();
75 } 71 }
76 72
77 void MockHostResolverBase::Reset(HostResolverProc* interceptor) { 73 void MockHostResolverBase::Reset(HostResolverProc* interceptor) {
78 synchronous_mode_ = false; 74 synchronous_mode_ = false;
79 75
80 // At the root of the chain, map everything to localhost. 76 // At the root of the chain, map everything to localhost.
81 scoped_refptr<RuleBasedHostResolverProc> catchall = 77 scoped_refptr<RuleBasedHostResolverProc> catchall =
82 new RuleBasedHostResolverProc(NULL); 78 new RuleBasedHostResolverProc(NULL);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 CHECK(old_proc == current_proc_); 231 CHECK(old_proc == current_proc_);
236 } 232 }
237 233
238 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) { 234 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) {
239 current_proc_ = proc; 235 current_proc_ = proc;
240 previous_proc_ = HostResolverProc::SetDefault(current_proc_); 236 previous_proc_ = HostResolverProc::SetDefault(current_proc_);
241 current_proc_->SetLastProc(previous_proc_); 237 current_proc_->SetLastProc(previous_proc_);
242 } 238 }
243 239
244 } // namespace net 240 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698