diff options
author | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-21 21:23:20 +0000 |
---|---|---|
committer | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-21 21:23:20 +0000 |
commit | b3601bc27df66f4e58086defc5788fc6365e4601 (patch) | |
tree | 1a938a765e1386e784ff726c580cfa93502727c4 /net/base/priority_queue.h | |
parent | ad48b7fbd53d9180b5b917dbf9142b7bd6fa6fa6 (diff) | |
download | chromium_src-b3601bc27df66f4e58086defc5788fc6365e4601.zip chromium_src-b3601bc27df66f4e58086defc5788fc6365e4601.tar.gz chromium_src-b3601bc27df66f4e58086defc5788fc6365e4601.tar.bz2 |
[net] Asynchronous DNS ready for experiments.
If started with --enable-async-dns, HostResolverImpl will use
DnsConfigService to determine system DNS configuration and
DnsTransaction to resolve host names. It will fallback to
HostResolverProc on failure.
BUG=90881, 107880, 113829
TEST=./net_unittests --gtest_filter=HostResolverImpl*:Dns*
Review URL: http://codereview.chromium.org/9369045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/priority_queue.h')
-rw-r--r-- | net/base/priority_queue.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/base/priority_queue.h b/net/base/priority_queue.h index 037faed..f60b88c 100644 --- a/net/base/priority_queue.h +++ b/net/base/priority_queue.h @@ -47,7 +47,11 @@ class PriorityQueue : public base::NonThreadSafe { class Pointer { public: // Constructs a null pointer. - Pointer() : priority_(kNullPriority) {} + Pointer() : priority_(kNullPriority) { +#if !defined(NDEBUG) + id_ = static_cast<size_t>(-1); +#endif + } bool is_null() const { return priority_ == kNullPriority; } @@ -64,6 +68,10 @@ class PriorityQueue : public base::NonThreadSafe { return (priority_ == other.priority_) && (iterator_ == other.iterator_); } + void Reset() { + *this = Pointer(); + } + private: friend class PriorityQueue; |