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

Side by Side Diff: net/base/dns_reloader.cc

Issue 10825437: net: Fix more clang warnings about missing virtual and OVERRIDE annotations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/net_util.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/dns_reloader.h" 5 #include "net/base/dns_reloader.h"
6 6
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
8 !defined(OS_ANDROID) 8 !defined(OS_ANDROID)
9 9
10 #include <resolv.h> 10 #include <resolv.h>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 res_nclose(&_res); 77 res_nclose(&_res);
78 delete reload_state; 78 delete reload_state;
79 } 79 }
80 80
81 private: 81 private:
82 DnsReloader() : resolver_generation_(0) { 82 DnsReloader() : resolver_generation_(0) {
83 tls_index_.Initialize(SlotReturnFunction); 83 tls_index_.Initialize(SlotReturnFunction);
84 net::NetworkChangeNotifier::AddDNSObserver(this); 84 net::NetworkChangeNotifier::AddDNSObserver(this);
85 } 85 }
86 86
87 ~DnsReloader() { 87 virtual ~DnsReloader() {
88 NOTREACHED(); // LeakyLazyInstance is not destructed. 88 NOTREACHED(); // LeakyLazyInstance is not destructed.
89 } 89 }
90 90
91 base::Lock lock_; // Protects resolver_generation_. 91 base::Lock lock_; // Protects resolver_generation_.
92 int resolver_generation_; 92 int resolver_generation_;
93 friend struct base::DefaultLazyInstanceTraits<DnsReloader>; 93 friend struct base::DefaultLazyInstanceTraits<DnsReloader>;
94 94
95 // We use thread local storage to identify which ReloadState to interact with. 95 // We use thread local storage to identify which ReloadState to interact with.
96 static base::ThreadLocalStorage::StaticSlot tls_index_; 96 static base::ThreadLocalStorage::StaticSlot tls_index_;
97 97
(...skipping 18 matching lines...) Expand all
116 void DnsReloaderMaybeReload() { 116 void DnsReloaderMaybeReload() {
117 // This routine can be called by any of the DNS worker threads. 117 // This routine can be called by any of the DNS worker threads.
118 DnsReloader* dns_reloader = g_dns_reloader.Pointer(); 118 DnsReloader* dns_reloader = g_dns_reloader.Pointer();
119 dns_reloader->MaybeReload(); 119 dns_reloader->MaybeReload();
120 } 120 }
121 121
122 } // namespace net 122 } // namespace net
123 123
124 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && 124 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) &&
125 // !defined(OS_ANDROID) 125 // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « no previous file | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698