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

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

Issue 3119027: Adds HostResolveImpl Requests and Jobs to log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/host_resolver_impl_unittest.cc ('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 "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 HostCache* cache = NULL; 96 HostCache* cache = NULL;
97 97
98 if (use_caching_) { 98 if (use_caching_) {
99 cache = new HostCache( 99 cache = new HostCache(
100 100, // max entries. 100 100, // max entries.
101 base::TimeDelta::FromMinutes(1), 101 base::TimeDelta::FromMinutes(1),
102 base::TimeDelta::FromSeconds(0)); 102 base::TimeDelta::FromSeconds(0));
103 } 103 }
104 104
105 impl_ = new HostResolverImpl(proc, cache, 50u); 105 impl_ = new HostResolverImpl(proc, cache, 50u, NULL);
106 } 106 }
107 107
108 //----------------------------------------------------------------------------- 108 //-----------------------------------------------------------------------------
109 109
110 struct RuleBasedHostResolverProc::Rule { 110 struct RuleBasedHostResolverProc::Rule {
111 enum ResolverType { 111 enum ResolverType {
112 kResolverTypeFail, 112 kResolverTypeFail,
113 kResolverTypeSystem, 113 kResolverTypeSystem,
114 kResolverTypeIPLiteral, 114 kResolverTypeIPLiteral,
115 }; 115 };
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 CHECK_EQ(old_proc, current_proc_); 262 CHECK_EQ(old_proc, current_proc_);
263 } 263 }
264 264
265 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) { 265 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) {
266 current_proc_ = proc; 266 current_proc_ = proc;
267 previous_proc_ = HostResolverProc::SetDefault(current_proc_); 267 previous_proc_ = HostResolverProc::SetDefault(current_proc_);
268 current_proc_->SetLastProc(previous_proc_); 268 current_proc_->SetLastProc(previous_proc_);
269 } 269 }
270 270
271 } // namespace net 271 } // namespace net
OLDNEW
« no previous file with comments | « net/base/host_resolver_impl_unittest.cc ('k') | net/base/net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698