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

Side by Side Diff: content/public/test/fake_speech_recognition_manager.cc

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/test/fake_speech_recognition_manager.h" 5 #include "content/public/test/fake_speech_recognition_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/public/browser/speech_recognition_event_listener.h" 10 #include "content/public/browser/speech_recognition_event_listener.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 void FakeSpeechRecognitionManager::SetFakeRecognitionResult() { 142 void FakeSpeechRecognitionManager::SetFakeRecognitionResult() {
143 if (!session_id_) // Do a check in case we were cancelled.. 143 if (!session_id_) // Do a check in case we were cancelled..
144 return; 144 return;
145 145
146 VLOG(1) << "Setting fake recognition result."; 146 VLOG(1) << "Setting fake recognition result.";
147 listener_->OnAudioEnd(session_id_); 147 listener_->OnAudioEnd(session_id_);
148 SpeechRecognitionResult result; 148 SpeechRecognitionResult result;
149 result.hypotheses.push_back(SpeechRecognitionHypothesis( 149 result.hypotheses.push_back(SpeechRecognitionHypothesis(
150 ASCIIToUTF16(kTestResult), 1.0)); 150 base::ASCIIToUTF16(kTestResult), 1.0));
151 SpeechRecognitionResults results; 151 SpeechRecognitionResults results;
152 results.push_back(result); 152 results.push_back(result);
153 listener_->OnRecognitionResults(session_id_, results); 153 listener_->OnRecognitionResults(session_id_, results);
154 listener_->OnRecognitionEnd(session_id_); 154 listener_->OnRecognitionEnd(session_id_);
155 session_id_ = 0; 155 session_id_ = 0;
156 listener_ = NULL; 156 listener_ = NULL;
157 VLOG(1) << "Finished setting fake recognition result."; 157 VLOG(1) << "Finished setting fake recognition result.";
158 } 158 }
159 159
160 } // namespace content 160 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698