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

Unified Diff: content/browser/speech/speech_recognition_engine.cc

Issue 2919993002: Replace deprecated base::NonThreadSafe in /content/browser/speech 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/browser/speech/speech_recognition_engine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/speech_recognition_engine.cc
diff --git a/content/browser/speech/speech_recognition_engine.cc b/content/browser/speech/speech_recognition_engine.cc
index b6bd1d5094bfaf5fced0949a8c1cd59e4390b017..bd99e7ac998deff1ccf63467b9d3bc3e83901fb0 100644
--- a/content/browser/speech/speech_recognition_engine.cc
+++ b/content/browser/speech/speech_recognition_engine.cc
@@ -102,7 +102,9 @@ SpeechRecognitionEngine::SpeechRecognitionEngine(
use_framed_post_data_(false),
state_(STATE_IDLE) {}
-SpeechRecognitionEngine::~SpeechRecognitionEngine() {}
+SpeechRecognitionEngine::~SpeechRecognitionEngine() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+}
void SpeechRecognitionEngine::SetConfig(const Config& config) {
config_ = config;
@@ -145,7 +147,7 @@ void SpeechRecognitionEngine::OnURLFetchDownloadProgress(
void SpeechRecognitionEngine::DispatchHTTPResponse(const URLFetcher* source,
bool end_of_response) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(source);
const bool response_is_good = source->GetStatus().is_success() &&
source->GetResponseCode() == 200;
@@ -214,7 +216,7 @@ void SpeechRecognitionEngine::DispatchHTTPResponse(const URLFetcher* source,
}
bool SpeechRecognitionEngine::IsRecognitionPending() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return state_ != STATE_IDLE;
}
@@ -226,7 +228,7 @@ int SpeechRecognitionEngine::GetDesiredAudioChunkDurationMs() const {
void SpeechRecognitionEngine::DispatchEvent(
const FSMEventArgs& event_args) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK_LE(event_args.event, EVENT_MAX_VALUE);
DCHECK_LE(state_, STATE_MAX_VALUE);
« no previous file with comments | « content/browser/speech/speech_recognition_engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698