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

Unified Diff: net/dns/host_cache.h

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: fix compile Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: net/dns/host_cache.h
diff --git a/net/dns/host_cache.h b/net/dns/host_cache.h
index 37cf204e3ccb653aa3d642ad560a4ed361d7d5d9..a99eea5136356d8eed66b1564f69561bd79b38b0 100644
--- a/net/dns/host_cache.h
+++ b/net/dns/host_cache.h
@@ -14,7 +14,7 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "net/base/address_family.h"
#include "net/base/address_list.h"
@@ -25,7 +25,7 @@
namespace net {
// Cache used by HostResolver to map hostnames to their resolved result.
-class NET_EXPORT HostCache : NON_EXPORTED_BASE(public base::NonThreadSafe) {
+class NET_EXPORT HostCache {
public:
struct Key {
Key(const std::string& hostname, AddressFamily address_family,
@@ -199,6 +199,8 @@ class NET_EXPORT HostCache : NON_EXPORTED_BASE(public base::NonThreadSafe) {
int network_changes_;
EvictionCallback eviction_callback_;
+ THREAD_CHECKER(thread_checker_);
+
DISALLOW_COPY_AND_ASSIGN(HostCache);
};

Powered by Google App Engine
This is Rietveld 408576698