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

Unified Diff: components/signin/core/browser/refresh_token_annotation_request.cc

Issue 2908263003: Replace deprecated base::NonThreadSafe in components/signin 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 | « components/signin/core/browser/refresh_token_annotation_request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/refresh_token_annotation_request.cc
diff --git a/components/signin/core/browser/refresh_token_annotation_request.cc b/components/signin/core/browser/refresh_token_annotation_request.cc
index 191dab8ebf42c126f388166400754f7fc5b5abde..d1e11c92cacf651f931ec4217aeac545e7049b0c 100644
--- a/components/signin/core/browser/refresh_token_annotation_request.cc
+++ b/components/signin/core/browser/refresh_token_annotation_request.cc
@@ -41,7 +41,7 @@ RefreshTokenAnnotationRequest::RefreshTokenAnnotationRequest(
}
RefreshTokenAnnotationRequest::~RefreshTokenAnnotationRequest() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
// static
@@ -102,7 +102,7 @@ bool RefreshTokenAnnotationRequest::ShouldSendNow(PrefService* pref_service) {
void RefreshTokenAnnotationRequest::RequestAccessToken(
OAuth2TokenService* token_service,
const std::string& account_id) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
OAuth2TokenService::ScopeSet scopes;
scopes.insert(GaiaConstants::kOAuth1LoginScope);
access_token_request_ = token_service->StartRequest(account_id, scopes, this);
@@ -112,7 +112,7 @@ void RefreshTokenAnnotationRequest::OnGetTokenSuccess(
const OAuth2TokenService::Request* request,
const std::string& access_token,
const base::Time& expiration_time) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DVLOG(2) << "Got access token";
Start(request_context_getter_.get(), access_token);
}
@@ -120,7 +120,7 @@ void RefreshTokenAnnotationRequest::OnGetTokenSuccess(
void RefreshTokenAnnotationRequest::OnGetTokenFailure(
const OAuth2TokenService::Request* request,
const GoogleServiceAuthError& error) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DVLOG(2) << "Failed to get access token";
RecordRequestStatusHistogram(false);
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, request_callback_);
@@ -156,7 +156,7 @@ std::string RefreshTokenAnnotationRequest::CreateApiCallBody() {
void RefreshTokenAnnotationRequest::ProcessApiCallSuccess(
const net::URLFetcher* source) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DVLOG(2) << "Request succeeded";
RecordRequestStatusHistogram(true);
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, request_callback_);
@@ -165,7 +165,7 @@ void RefreshTokenAnnotationRequest::ProcessApiCallSuccess(
void RefreshTokenAnnotationRequest::ProcessApiCallFailure(
const net::URLFetcher* source) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DVLOG(2) << "Request failed";
RecordRequestStatusHistogram(false);
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, request_callback_);
« no previous file with comments | « components/signin/core/browser/refresh_token_annotation_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698