diff options
author | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 10:18:39 +0000 |
---|---|---|
committer | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 10:18:39 +0000 |
commit | 480e650681a7ac8169ceaefa52b327e6d4de568d (patch) | |
tree | 3796c076c8f2df73c3a2763840e274a9dfac1e85 /content/browser/speech/speech_input_browsertest.cc | |
parent | 2f959a6cc2951c097e9b0e39d260e72b7b97984e (diff) | |
download | chromium_src-480e650681a7ac8169ceaefa52b327e6d4de568d.zip chromium_src-480e650681a7ac8169ceaefa52b327e6d4de568d.tar.gz chromium_src-480e650681a7ac8169ceaefa52b327e6d4de568d.tar.bz2 |
Migrating NewRunnableMethod/Function to bind::Base in the speech input code.
BUG=61677
TEST=none
Review URL: http://codereview.chromium.org/8289007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/speech/speech_input_browsertest.cc')
-rw-r--r-- | content/browser/speech/speech_input_browsertest.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/content/browser/speech/speech_input_browsertest.cc b/content/browser/speech/speech_input_browsertest.cc index 4af042f..66a402f 100644 --- a/content/browser/speech/speech_input_browsertest.cc +++ b/content/browser/speech/speech_input_browsertest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/bind.h" #include "base/command_line.h" #include "base/file_path.h" #include "base/string_number_conversions.h" @@ -20,12 +21,6 @@ namespace speech_input { class FakeSpeechInputManager; } -// 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. -DISABLE_RUNNABLE_METHOD_REFCOUNT(speech_input::FakeSpeechInputManager); - namespace speech_input { const char* kTestResult = "Pictures of the moon"; @@ -70,8 +65,14 @@ class FakeSpeechInputManager : public SpeechInputManager { grammar_ = grammar; if (send_fake_response_) { // Give the fake result in a short while. - MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, - &FakeSpeechInputManager::SetFakeRecognitionResult)); + MessageLoop::current()->PostTask(FROM_HERE, base::Bind( + &FakeSpeechInputManager::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))); } } virtual void CancelRecognition(int caller_id) { |