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

Unified Diff: net/http/transport_security_state.h

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: rebase on r476634 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
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/http/transport_security_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/transport_security_state.h
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h
index 614762ee43b7cde4987dc2c9d53ac57818ff7105..e81aad5a6cdfbdb6204aa5e1b1f9d799dce3618f 100644
--- a/net/http/transport_security_state.h
+++ b/net/http/transport_security_state.h
@@ -15,7 +15,7 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/strings/string_piece.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "net/base/expiring_cache.h"
#include "net/base/hash_value.h"
@@ -47,8 +47,7 @@ void NET_EXPORT_PRIVATE SetTransportSecurityStateSourceForTesting(
// http://tools.ietf.org/html/ietf-websec-strict-transport-sec, and
// HTTP-based dynamic public key pinning (HPKP) is defined in
// http://tools.ietf.org/html/ietf-websec-key-pinning.
-class NET_EXPORT TransportSecurityState
- : NON_EXPORTED_BASE(public base::NonThreadSafe) {
+class NET_EXPORT TransportSecurityState {
public:
class NET_EXPORT Delegate {
public:
@@ -560,6 +559,10 @@ class NET_EXPORT TransportSecurityState
const HostPortPair& host_port_pair,
const SSLInfo& ssl_info);
+ void AssertCalledOnValidThread() const {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+ }
+
// For unit tests only. Causes CheckCTRequirements() to return
// CT_REQUIREMENTS_NOT_MET (if |*required| is true) or CT_REQUIREMENTS_MET (if
// |*required| is false) for non-compliant connections by default (that is,
@@ -707,6 +710,8 @@ class NET_EXPORT TransportSecurityState
ReportCache sent_hpkp_reports_cache_;
ReportCache sent_expect_ct_reports_cache_;
+ THREAD_CHECKER(thread_checker_);
+
DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
};
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/http/transport_security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698