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

Side by Side Diff: net/base/host_resolver.h

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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef NET_BASE_HOST_RESOLVER_H_ 5 #ifndef NET_BASE_HOST_RESOLVER_H_
6 #define NET_BASE_HOST_RESOLVER_H_ 6 #define NET_BASE_HOST_RESOLVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 virtual void CancelRequest(RequestHandle req) = 0; 140 virtual void CancelRequest(RequestHandle req) = 0;
141 141
142 // Adds an observer to this resolver. The observer will be notified of the 142 // Adds an observer to this resolver. The observer will be notified of the
143 // start and completion of all requests (excluding cancellation). |observer| 143 // start and completion of all requests (excluding cancellation). |observer|
144 // must remain valid for the duration of this HostResolver's lifetime. 144 // must remain valid for the duration of this HostResolver's lifetime.
145 virtual void AddObserver(Observer* observer) = 0; 145 virtual void AddObserver(Observer* observer) = 0;
146 146
147 // Unregisters an observer previously added by AddObserver(). 147 // Unregisters an observer previously added by AddObserver().
148 virtual void RemoveObserver(Observer* observer) = 0; 148 virtual void RemoveObserver(Observer* observer) = 0;
149 149
150 // Returns the host cache, or NULL if this implementation does not use
151 // a HostCache.
152 virtual HostCache* GetHostCache() = 0;
153
154 // TODO(eroman): temp hack for http://crbug.com/18373 150 // TODO(eroman): temp hack for http://crbug.com/18373
155 virtual void Shutdown() = 0; 151 virtual void Shutdown() = 0;
156 152
157 // Sets the default AddressFamily to use when requests have left it 153 // Sets the default AddressFamily to use when requests have left it
158 // unspecified. For example, this could be used to restrict resolution 154 // unspecified. For example, this could be used to restrict resolution
159 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to 155 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to
160 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. 156 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6.
161 virtual void SetDefaultAddressFamily(AddressFamily address_family) {} 157 virtual void SetDefaultAddressFamily(AddressFamily address_family) {}
162 158
159 virtual bool IsHostResolverImpl() { return false; }
willchan no longer on Chromium 2010/02/01 19:31:01 My first gut reaction was "ew". This looks ugly.
eroman 2010/02/01 20:31:25 I agree that this is ugly. Here is my justificatio
willchan no longer on Chromium 2010/02/01 21:27:33 Yes, I'd imagine the incognito consumer would have
160
163 protected: 161 protected:
164 friend class base::RefCountedThreadSafe<HostResolver>; 162 friend class base::RefCountedThreadSafe<HostResolver>;
165 163
166 HostResolver() { } 164 HostResolver() { }
167 165
168 // If any completion callbacks are pending when the resolver is destroyed, 166 // If any completion callbacks are pending when the resolver is destroyed,
169 // the host resolutions are cancelled, and the completion callbacks will not 167 // the host resolutions are cancelled, and the completion callbacks will not
170 // be called. 168 // be called.
171 virtual ~HostResolver() {} 169 virtual ~HostResolver() {}
172 170
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 }; 214 };
217 215
218 // Creates a HostResolver implementation that queries the underlying system. 216 // Creates a HostResolver implementation that queries the underlying system.
219 // (Except if a unit-test has changed the global HostResolverProc using 217 // (Except if a unit-test has changed the global HostResolverProc using
220 // ScopedHostResolverProc to intercept requests to the system). 218 // ScopedHostResolverProc to intercept requests to the system).
221 HostResolver* CreateSystemHostResolver(); 219 HostResolver* CreateSystemHostResolver();
222 220
223 } // namespace net 221 } // namespace net
224 222
225 #endif // NET_BASE_HOST_RESOLVER_H_ 223 #endif // NET_BASE_HOST_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698