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

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

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 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/base/net_log.h » ('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 28 matching lines...) Expand all
39 39
40 MockHostResolverBase::MockHostResolverBase(bool use_caching) 40 MockHostResolverBase::MockHostResolverBase(bool use_caching)
41 : use_caching_(use_caching) { 41 : use_caching_(use_caching) {
42 Reset(NULL); 42 Reset(NULL);
43 } 43 }
44 44
45 int MockHostResolverBase::Resolve(const RequestInfo& info, 45 int MockHostResolverBase::Resolve(const RequestInfo& info,
46 AddressList* addresses, 46 AddressList* addresses,
47 CompletionCallback* callback, 47 CompletionCallback* callback,
48 RequestHandle* out_req, 48 RequestHandle* out_req,
49 LoadLog* load_log) { 49 const BoundNetLog& net_log) {
50 if (synchronous_mode_) { 50 if (synchronous_mode_) {
51 callback = NULL; 51 callback = NULL;
52 out_req = NULL; 52 out_req = NULL;
53 } 53 }
54 return impl_->Resolve(info, addresses, callback, out_req, load_log); 54 return impl_->Resolve(info, addresses, callback, out_req, net_log);
55 } 55 }
56 56
57 void MockHostResolverBase::CancelRequest(RequestHandle req) { 57 void MockHostResolverBase::CancelRequest(RequestHandle req) {
58 impl_->CancelRequest(req); 58 impl_->CancelRequest(req);
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
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 CHECK_EQ(old_proc, current_proc_); 227 CHECK_EQ(old_proc, current_proc_);
228 } 228 }
229 229
230 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) { 230 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) {
231 current_proc_ = proc; 231 current_proc_ = proc;
232 previous_proc_ = HostResolverProc::SetDefault(current_proc_); 232 previous_proc_ = HostResolverProc::SetDefault(current_proc_);
233 current_proc_->SetLastProc(previous_proc_); 233 current_proc_->SetLastProc(previous_proc_);
234 } 234 }
235 235
236 } // namespace net 236 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mock_host_resolver.h ('k') | net/base/net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698