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

Unified Diff: content/public/test/test_download_request_handler.cc

Issue 2913673002: Replace deprecated base::NonThreadSafe in content/public/test in favor of SequenceChecker. (Closed)
Patch Set: 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 | « content/public/test/test_download_request_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_download_request_handler.cc
diff --git a/content/public/test/test_download_request_handler.cc b/content/public/test/test_download_request_handler.cc
index 9e854264fb58e73031a7e2635bc7ccf793191c04..45287b19ef96020b529cd6f4515cc8771773e548 100644
--- a/content/public/test/test_download_request_handler.cc
+++ b/content/public/test/test_download_request_handler.cc
@@ -638,7 +638,7 @@ TestDownloadRequestHandler::TestDownloadRequestHandler(const GURL& url)
}
void TestDownloadRequestHandler::StartServing(const Parameters& parameters) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
Interceptor::JobFactory job_factory =
base::Bind(&PartialResponseJob::Factory, parameters);
// Interceptor, if valid, is already registered and serving requests. We just
@@ -651,7 +651,7 @@ void TestDownloadRequestHandler::StartServing(const Parameters& parameters) {
void TestDownloadRequestHandler::StartServingStaticResponse(
const base::StringPiece& headers) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
Parameters parameters;
parameters.on_start_handler = base::Bind(
&RespondToOnStartedCallbackWithStaticHeaders, headers.as_string());
@@ -679,14 +679,14 @@ void TestDownloadRequestHandler::GetPatternBytes(int seed,
}
TestDownloadRequestHandler::~TestDownloadRequestHandler() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&Interceptor::Unregister, interceptor_));
}
void TestDownloadRequestHandler::GetCompletedRequestInfo(
TestDownloadRequestHandler::CompletedRequests* requests) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
base::RunLoop run_loop;
BrowserThread::PostTaskAndReply(
BrowserThread::IO, FROM_HERE,
« no previous file with comments | « content/public/test/test_download_request_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698