Index: net/url_request/url_request_context.h |
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h |
index 5874bbc157c4738cdaa197283cb058bc4026dfa6..2b00768fa34c84e91a30b5c6493e560b80927e34 100644 |
--- a/net/url_request/url_request_context.h |
+++ b/net/url_request/url_request_context.h |
@@ -15,7 +15,7 @@ |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
-#include "base/threading/non_thread_safe.h" |
+#include "base/threading/thread_checker.h" |
#include "base/trace_event/memory_dump_provider.h" |
#include "net/base/net_export.h" |
#include "net/base/request_priority.h" |
@@ -60,8 +60,7 @@ class URLRequestThrottlerManager; |
// URLRequestContext rather than creating a new one, as guaranteeing that the |
// URLRequestContext is destroyed before its members can be difficult. |
class NET_EXPORT URLRequestContext |
- : NON_EXPORTED_BASE(public base::NonThreadSafe), |
- public base::trace_event::MemoryDumpProvider { |
+ : public base::trace_event::MemoryDumpProvider { |
public: |
URLRequestContext(); |
~URLRequestContext() override; |
@@ -285,6 +284,10 @@ class NET_EXPORT URLRequestContext |
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
base::trace_event::ProcessMemoryDump* pmd) override; |
+ void AssertCalledOnValidThread() { |
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); |
+ } |
+ |
private: |
// --------------------------------------------------------------------------- |
// Important: When adding any new members below, consider whether they need to |
@@ -337,6 +340,8 @@ class NET_EXPORT URLRequestContext |
// |this| and are not yet destroyed. This doesn't need to be in CopyFrom. |
mutable size_t largest_outstanding_requests_count_seen_; |
+ THREAD_CHECKER(thread_checker_); |
+ |
DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
}; |