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

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

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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/download_test_observer.cc ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/fake_speech_recognition_manager.cc
diff --git a/content/public/test/fake_speech_recognition_manager.cc b/content/public/test/fake_speech_recognition_manager.cc
index 3bc2946cc7a3189bf4f8b978bc752e41e1d16284..8f89255f20f35cfaee831e735305a5c4f791bad0 100644
--- a/content/public/test/fake_speech_recognition_manager.cc
+++ b/content/public/test/fake_speech_recognition_manager.cc
@@ -54,14 +54,16 @@ void FakeSpeechRecognitionManager::StartSession(int session_id) {
if (should_send_fake_response_) {
// Give the fake result in a short while.
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &FakeSpeechRecognitionManager::SetFakeRecognitionResult,
- // This class does not need to be refcounted (typically done by
- // PostTask) since it will outlive the test and gets released only
- // when the test shuts down. Disabling refcounting here saves a bit
- // of unnecessary code and the factory method can return a plain
- // pointer below as required by the real code.
- base::Unretained(this)));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &FakeSpeechRecognitionManager::SetFakeRecognitionResult,
+ // This class does not need to be refcounted (typically done by
+ // PostTask) since it will outlive the test and gets released only
+ // when the test shuts down. Disabling refcounting here saves a bit
+ // of unnecessary code and the factory method can return a plain
+ // pointer below as required by the real code.
+ base::Unretained(this)));
}
recognition_started_event_.Signal();
}
« no previous file with comments | « content/public/test/download_test_observer.cc ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698