OLD | NEW |
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/host_resolver_impl.h" | 5 #include "net/base/host_resolver_impl.h" |
6 #include "net/base/net_log.h" | 6 #include "net/base/net_log.h" |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <deque> | 9 #include <deque> |
10 | 10 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 class HostResolverImpl::RequestsTrace | 160 class HostResolverImpl::RequestsTrace |
161 : public base::RefCountedThreadSafe<HostResolverImpl::RequestsTrace> { | 161 : public base::RefCountedThreadSafe<HostResolverImpl::RequestsTrace> { |
162 public: | 162 public: |
163 RequestsTrace() {} | 163 RequestsTrace() {} |
164 | 164 |
165 void Add(const std::string& msg) { | 165 void Add(const std::string& msg) { |
166 CapturingNetLog::Entry entry(NetLog::TYPE_TODO_STRING, | 166 CapturingNetLog::Entry entry(NetLog::TYPE_TODO_STRING, |
167 base::TimeTicks::Now(), | 167 base::TimeTicks::Now(), |
168 NetLog::Source(), | 168 NetLog::Source(), |
169 NetLog::PHASE_NONE, | 169 NetLog::PHASE_NONE, |
170 new NetLogStringParameter(msg)); | 170 new NetLogStringParameter("todo", msg)); |
171 AutoLock l(lock_); | 171 AutoLock l(lock_); |
172 entries_.push_back(entry); | 172 entries_.push_back(entry); |
173 } | 173 } |
174 | 174 |
175 void Get(CapturingNetLog::EntryList* entries) { | 175 void Get(CapturingNetLog::EntryList* entries) { |
176 AutoLock l(lock_); | 176 AutoLock l(lock_); |
177 *entries = entries_; | 177 *entries = entries_; |
178 } | 178 } |
179 | 179 |
180 void Clear() { | 180 void Clear() { |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 if (r == req) | 1194 if (r == req) |
1195 return error; | 1195 return error; |
1196 | 1196 |
1197 r->OnComplete(error, AddressList()); | 1197 r->OnComplete(error, AddressList()); |
1198 } | 1198 } |
1199 | 1199 |
1200 return ERR_IO_PENDING; | 1200 return ERR_IO_PENDING; |
1201 } | 1201 } |
1202 | 1202 |
1203 } // namespace net | 1203 } // namespace net |
OLD | NEW |