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

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

Issue 165404: Implement LoadLog, and hook up HostResolverImpl to LoadLog.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Do an unsigned/signed thing for GCC compile Created 11 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 | « no previous file | net/base/host_resolver_impl.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) 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_IMPL_H_ 5 #ifndef NET_BASE_HOST_RESOLVER_IMPL_H_
6 #define NET_BASE_HOST_RESOLVER_IMPL_H_ 6 #define NET_BASE_HOST_RESOLVER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Returns the outstanding job for |hostname|, or NULL if there is none. 88 // Returns the outstanding job for |hostname|, or NULL if there is none.
89 Job* FindOutstandingJob(const std::string& hostname); 89 Job* FindOutstandingJob(const std::string& hostname);
90 90
91 // Removes |job| from the outstanding jobs list. 91 // Removes |job| from the outstanding jobs list.
92 void RemoveOutstandingJob(Job* job); 92 void RemoveOutstandingJob(Job* job);
93 93
94 // Callback for when |job| has completed with |error| and |addrlist|. 94 // Callback for when |job| has completed with |error| and |addrlist|.
95 void OnJobComplete(Job* job, int error, const AddressList& addrlist); 95 void OnJobComplete(Job* job, int error, const AddressList& addrlist);
96 96
97 // Notify all observers of the start of a resolve request. 97 // Called when a request has just been started.
98 void NotifyObserversStartRequest(int request_id, 98 void OnStartRequest(LoadLog* load_log,
99 const RequestInfo& info); 99 int request_id,
100 const RequestInfo& info);
100 101
101 // Notify all observers of the completion of a resolve request. 102 // Called when a request has just completed (before its callback is run).
102 void NotifyObserversFinishRequest(int request_id, 103 void OnFinishRequest(LoadLog* load_log,
103 const RequestInfo& info, 104 int request_id,
104 int error); 105 const RequestInfo& info,
106 int error);
105 107
106 // Notify all observers of the cancellation of a resolve request. 108 // Called when a request has been cancelled.
107 void NotifyObserversCancelRequest(int request_id, 109 void OnCancelRequest(LoadLog* load_log,
108 const RequestInfo& info); 110 int request_id,
111 const RequestInfo& info);
109 112
110 // Cache of host resolution results. 113 // Cache of host resolution results.
111 HostCache cache_; 114 HostCache cache_;
112 115
113 // Map from hostname to outstanding job. 116 // Map from hostname to outstanding job.
114 JobMap jobs_; 117 JobMap jobs_;
115 118
116 // The job that OnJobComplete() is currently processing (needed in case 119 // The job that OnJobComplete() is currently processing (needed in case
117 // HostResolver gets deleted from within the callback). 120 // HostResolver gets deleted from within the callback).
118 scoped_refptr<Job> cur_completing_job_; 121 scoped_refptr<Job> cur_completing_job_;
(...skipping 11 matching lines...) Expand all
130 133
131 // TODO(eroman): temp hack for http://crbug.com/15513 134 // TODO(eroman): temp hack for http://crbug.com/15513
132 bool shutdown_; 135 bool shutdown_;
133 136
134 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); 137 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl);
135 }; 138 };
136 139
137 } // namespace net 140 } // namespace net
138 141
139 #endif // NET_BASE_HOST_RESOLVER_IMPL_H_ 142 #endif // NET_BASE_HOST_RESOLVER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698