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

Unified Diff: net/url_request/sdch_dictionary_fetcher.cc

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/url_request/sdch_dictionary_fetcher.h ('k') | net/url_request/test_url_fetcher_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/sdch_dictionary_fetcher.cc
diff --git a/net/url_request/sdch_dictionary_fetcher.cc b/net/url_request/sdch_dictionary_fetcher.cc
index 1a3476612a77539bfe1435d708378fe1dcb2709a..361d48b5ec511366556e63610175d04092ae7d96 100644
--- a/net/url_request/sdch_dictionary_fetcher.cc
+++ b/net/url_request/sdch_dictionary_fetcher.cc
@@ -116,11 +116,12 @@ SdchDictionaryFetcher::SdchDictionaryFetcher(URLRequestContext* context)
in_loop_(false),
fetch_queue_(new UniqueFetchQueue()),
context_(context) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(context);
}
SdchDictionaryFetcher::~SdchDictionaryFetcher() {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
}
bool SdchDictionaryFetcher::Schedule(
@@ -136,7 +137,7 @@ bool SdchDictionaryFetcher::ScheduleReload(
}
void SdchDictionaryFetcher::Cancel() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
ResetRequest();
next_state_ = STATE_NONE;
@@ -157,7 +158,7 @@ void SdchDictionaryFetcher::OnReceivedRedirect(
void SdchDictionaryFetcher::OnResponseStarted(URLRequest* request,
int net_error) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK_EQ(request, current_request_.get());
DCHECK_EQ(next_state_, STATE_SEND_REQUEST_PENDING);
DCHECK(!in_loop_);
@@ -180,7 +181,7 @@ void SdchDictionaryFetcher::OnResponseStarted(URLRequest* request,
void SdchDictionaryFetcher::OnReadCompleted(URLRequest* request,
int bytes_read) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK_EQ(request, current_request_.get());
DCHECK_EQ(next_state_, STATE_READ_BODY_COMPLETE);
DCHECK(!in_loop_);
@@ -193,7 +194,7 @@ bool SdchDictionaryFetcher::ScheduleInternal(
const GURL& dictionary_url,
bool reload,
const OnDictionaryFetchedCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// If Push() fails, |dictionary_url| has already been fetched or scheduled to
// be fetched.
@@ -264,7 +265,7 @@ int SdchDictionaryFetcher::DoLoop(int rv) {
}
int SdchDictionaryFetcher::DoSendRequest(int rv) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// |rv| is ignored, as the result from the previous request doesn't
// affect the next request.
@@ -336,7 +337,7 @@ int SdchDictionaryFetcher::DoReceivedRedirect(int rv) {
}
int SdchDictionaryFetcher::DoSendRequestPending(int rv) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// If there's been an error, abort the current request.
if (rv != OK) {
@@ -350,7 +351,7 @@ int SdchDictionaryFetcher::DoSendRequestPending(int rv) {
}
int SdchDictionaryFetcher::DoReadBody(int rv) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// If there's been an error, abort the current request.
if (rv != OK) {
@@ -368,7 +369,7 @@ int SdchDictionaryFetcher::DoReadBody(int rv) {
}
int SdchDictionaryFetcher::DoReadBodyComplete(int rv) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// An error; abort the current request.
if (rv < 0) {
@@ -392,7 +393,7 @@ int SdchDictionaryFetcher::DoReadBodyComplete(int rv) {
}
int SdchDictionaryFetcher::DoCompleteRequest(int rv) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// If the dictionary was successfully fetched, add it to the manager.
if (rv == OK) {
« no previous file with comments | « net/url_request/sdch_dictionary_fetcher.h ('k') | net/url_request/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698