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

Unified Diff: net/http/transport_security_state.h

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: another compile nit 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/http/transport_security_state.h
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h
index 7ce883a952a271cae547bd97544ebc13c142b487..0f53dd26e61448b9b4e1e8b4c0f8fcf86238f88e 100644
--- a/net/http/transport_security_state.h
+++ b/net/http/transport_security_state.h
@@ -14,8 +14,8 @@
#include "base/feature_list.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
+#include "base/sequence_checker.h"
#include "base/strings/string_piece.h"
-#include "base/threading/non_thread_safe.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:
@@ -566,6 +565,10 @@ class NET_EXPORT TransportSecurityState
const HostPortPair& host_port_pair,
const SSLInfo& ssl_info);
+ void AssertCalledOnValidSequence() const {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_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,
@@ -696,6 +699,8 @@ class NET_EXPORT TransportSecurityState
ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>>
sent_reports_cache_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
};

Powered by Google App Engine
This is Rietveld 408576698