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

Unified Diff: net/url_request/url_request_throttler_manager.cc

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 | « net/url_request/url_request_throttler_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_throttler_manager.cc
diff --git a/net/url_request/url_request_throttler_manager.cc b/net/url_request/url_request_throttler_manager.cc
index 07e3bb6ab0facd97fbd64e3eb7500c4ab52b060e..25f6e86e7b1adfb202045720582af68888161b93 100644
--- a/net/url_request/url_request_throttler_manager.cc
+++ b/net/url_request/url_request_throttler_manager.cc
@@ -33,31 +33,6 @@ struct IteratorHistory {
namespace net {
-ThreadCheckerForRelease::ThreadCheckerForRelease()
- : valid_thread_id_(base::kInvalidThreadId) {
- EnsureThreadIdAssigned();
-}
-
-ThreadCheckerForRelease::~ThreadCheckerForRelease() {}
-
-bool ThreadCheckerForRelease::CalledOnValidThread() const {
- EnsureThreadIdAssigned();
- base::AutoLock auto_lock(lock_);
- return valid_thread_id_ == base::PlatformThread::CurrentId();
-}
-
-void ThreadCheckerForRelease::DetachFromThread() {
- base::AutoLock auto_lock(lock_);
- valid_thread_id_ = base::kInvalidThreadId;
-}
-
-void ThreadCheckerForRelease::EnsureThreadIdAssigned() const {
- base::AutoLock auto_lock(lock_);
- if (valid_thread_id_ != base::kInvalidThreadId)
- return;
- valid_thread_id_ = base::PlatformThread::CurrentId();
-}
-
const unsigned int URLRequestThrottlerManager::kMaximumNumberOfEntries = 1500;
const unsigned int URLRequestThrottlerManager::kRequestsBetweenCollecting = 200;
@@ -162,13 +137,13 @@ void URLRequestThrottlerManager::GarbageCollectEntries() {
// is in common between the crash dumps. Note that this is not equivalent
// to the command line stored in the PEB of the minidump since it may
// have been modified based on the about:labs preferences.
- std::string command_line_string;
-#if defined(OS_WIN)
- std::wstring wstr = CommandLine::ForCurrentProcess()->command_line_string();
- command_line_string = WideToASCII(wstr);
-#else
- command_line_string =
- CommandLine::ForCurrentProcess()->command_line_string();
+ std::string command_line_string;
+#if defined(OS_WIN)
+ std::wstring wstr = CommandLine::ForCurrentProcess()->command_line_string();
+ command_line_string = WideToASCII(wstr);
+#else
+ command_line_string =
+ CommandLine::ForCurrentProcess()->command_line_string();
#endif
char command_line_buffer[400] = { 0 };
base::strlcpy(command_line_buffer, command_line_string.c_str(),
« no previous file with comments | « net/url_request/url_request_throttler_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698