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

Unified Diff: net/base/network_delegate.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/base/network_change_notifier_win.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index e13ebed5f2e3ef806d7b182812f12ff4c387ec0e..79a94d6d99a2f2c094ad4c30692b76067c4f0a92 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -11,7 +11,7 @@
#include "base/callback.h"
#include "base/strings/string16.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/threading/thread_checker.h"
#include "net/base/auth.h"
#include "net/base/completion_callback.h"
#include "net/base/net_export.h"
@@ -46,7 +46,7 @@ class HttpResponseHeaders;
class ProxyInfo;
class URLRequest;
-class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
+class NET_EXPORT NetworkDelegate {
public:
// AuthRequiredResponse indicates how a NetworkDelegate handles an
// OnAuthRequired call. It's placed in this file to prevent url_request.h
@@ -59,7 +59,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
};
typedef base::Callback<void(AuthRequiredResponse)> AuthCallback;
- virtual ~NetworkDelegate() {}
+ virtual ~NetworkDelegate();
// Notification interface called by the network stack. Note that these
// functions mostly forward to the private virtuals. They also add some sanity
@@ -124,6 +124,9 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
bool CanUseReportingClient(const url::Origin& origin,
const GURL& endpoint) const;
+ protected:
+ THREAD_CHECKER(thread_checker_);
+
private:
// This is the interface for subclasses of NetworkDelegate to implement. These
// member functions will be called by the respective public notification
« no previous file with comments | « net/base/network_change_notifier_win.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698