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

Unified Diff: net/url_request/url_request_throttler_manager.h

Issue 6599004: Modify ThreadChecker and NonThreadSafe so that their functionality is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update copyright year for new/moved files Created 9 years, 10 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 | « base/threading/thread_checker_unittest.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_throttler_manager.h
diff --git a/net/url_request/url_request_throttler_manager.h b/net/url_request/url_request_throttler_manager.h
index f037fe7b43074dacf8cefcf858dec6d026c3660c..d1ede1d02803f875bbbeeda2e3929c4ce0251ccb 100644
--- a/net/url_request/url_request_throttler_manager.h
+++ b/net/url_request/url_request_throttler_manager.h
@@ -11,37 +11,12 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/singleton.h"
-#include "base/synchronization/lock.h" // ThreadCheckerForRelease
-#include "base/threading/platform_thread.h" // ThreadCheckerForRelease
+#include "base/threading/thread_checker_impl.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_throttler_entry.h"
namespace net {
-// TODO(joi): Delete this temporary copy of base::ThreadChecker (needed to
-// enable it in release builds) and go back to simply inheriting from
-// NonThreadSafe once crbug.com/71721 has been tracked down.
-class ThreadCheckerForRelease {
- public:
- ThreadCheckerForRelease();
- ~ThreadCheckerForRelease();
-
- bool CalledOnValidThread() const;
-
- // Changes the thread that is checked for in CalledOnValidThread. This may
- // be useful when an object may be created on one thread and then used
- // exclusively on another thread.
- void DetachFromThread();
-
- private:
- void EnsureThreadIdAssigned() const;
-
- mutable base::Lock lock_;
- // This is mutable so that CalledOnValidThread can set it.
- // It's guarded by |lock_|.
- mutable base::PlatformThreadId valid_thread_id_;
-};
-
// Class that registers URL request throttler entries for URLs being accessed
// in order to supervise traffic. URL requests for HTTP contents should
// register their URLs in this manager on each request.
@@ -151,7 +126,7 @@ class URLRequestThrottlerManager {
// workaround.
bool being_tested_;
- ThreadCheckerForRelease thread_checker_;
+ base::ThreadCheckerImpl thread_checker_;
DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerManager);
};
« no previous file with comments | « base/threading/thread_checker_unittest.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698