Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "net/base/host_resolver_proc.h" | 5 #include "net/base/host_resolver_proc.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <ws2tcpip.h> | 10 #include <ws2tcpip.h> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 } | 106 } |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 friend struct DefaultSingletonTraits<DnsReloadTimer>; | 109 friend struct DefaultSingletonTraits<DnsReloadTimer>; |
| 110 | 110 |
| 111 DnsReloadTimer() { | 111 DnsReloadTimer() { |
| 112 tls_index_.Initialize(SlotReturnFunction); | 112 tls_index_.Initialize(SlotReturnFunction); |
| 113 } | 113 } |
| 114 | 114 |
| 115 ~DnsReloadTimer() { | 115 ~DnsReloadTimer() { |
| 116 SlotReturnFunction(tls_index_.Get()); | |
|
wtc
2009/11/30 19:07:46
This only frees the thread local storage of the cu
| |
| 116 tls_index_.Free(); | 117 tls_index_.Free(); |
| 117 } | 118 } |
| 118 | 119 |
| 119 // We use thread local storage to identify which base::TimeTicks to | 120 // We use thread local storage to identify which base::TimeTicks to |
| 120 // interact with. | 121 // interact with. |
| 121 static ThreadLocalStorage::Slot tls_index_ ; | 122 static ThreadLocalStorage::Slot tls_index_ ; |
| 122 | 123 |
| 123 DISALLOW_COPY_AND_ASSIGN(DnsReloadTimer); | 124 DISALLOW_COPY_AND_ASSIGN(DnsReloadTimer); |
| 124 }; | 125 }; |
| 125 | 126 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 #endif | 199 #endif |
| 199 | 200 |
| 200 if (err) | 201 if (err) |
| 201 return ERR_NAME_NOT_RESOLVED; | 202 return ERR_NAME_NOT_RESOLVED; |
| 202 | 203 |
| 203 addrlist->Adopt(ai); | 204 addrlist->Adopt(ai); |
| 204 return OK; | 205 return OK; |
| 205 } | 206 } |
| 206 | 207 |
| 207 } // namespace net | 208 } // namespace net |
| OLD | NEW |