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

Unified Diff: components/drive/service/drive_api_service.cc

Issue 2907223002: Deprecate NonThreadSafe in components/drive in favor of SequenceChecker. (Closed)
Patch Set: rebase off dependency 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 | « components/drive/service/drive_api_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/drive/service/drive_api_service.cc
diff --git a/components/drive/service/drive_api_service.cc b/components/drive/service/drive_api_service.cc
index 89672e6c0c491e595d97ebeb54b43f31c986971a..fd0a0272845b72f50b1885c9c132a4396610229d 100644
--- a/components/drive/service/drive_api_service.cc
+++ b/components/drive/service/drive_api_service.cc
@@ -189,6 +189,7 @@ BatchRequestConfigurator::BatchRequestConfigurator(
}
BatchRequestConfigurator::~BatchRequestConfigurator() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// The batch requst has not been committed.
if (batch_request_)
cancel_callback_.Run();
@@ -203,7 +204,7 @@ google_apis::CancelCallback BatchRequestConfigurator::MultipartUploadNewFile(
const UploadNewFileOptions& options,
const google_apis::FileResourceCallback& callback,
const google_apis::ProgressCallback& progress_callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!callback.is_null());
std::unique_ptr<google_apis::BatchableDelegate> delegate(
@@ -230,7 +231,7 @@ BatchRequestConfigurator::MultipartUploadExistingFile(
const UploadExistingFileOptions& options,
const google_apis::FileResourceCallback& callback,
const google_apis::ProgressCallback& progress_callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!callback.is_null());
std::unique_ptr<google_apis::BatchableDelegate> delegate(
@@ -250,7 +251,7 @@ BatchRequestConfigurator::MultipartUploadExistingFile(
}
void BatchRequestConfigurator::Commit() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!batch_request_)
return;
batch_request_->Commit();
« no previous file with comments | « components/drive/service/drive_api_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698