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

Side by Side Diff: content/browser/speech/google_streaming_remote_engine.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/speech/google_streaming_remote_engine.h" 5 #include "content/browser/speech/google_streaming_remote_engine.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 const proto::SpeechRecognitionAlternative& ws_alternative = 448 const proto::SpeechRecognitionAlternative& ws_alternative =
449 ws_result.alternative(j); 449 ws_result.alternative(j);
450 SpeechRecognitionHypothesis hypothesis; 450 SpeechRecognitionHypothesis hypothesis;
451 if (ws_alternative.has_confidence()) 451 if (ws_alternative.has_confidence())
452 hypothesis.confidence = ws_alternative.confidence(); 452 hypothesis.confidence = ws_alternative.confidence();
453 else if (ws_result.has_stability()) 453 else if (ws_result.has_stability())
454 hypothesis.confidence = ws_result.stability(); 454 hypothesis.confidence = ws_result.stability();
455 DCHECK(ws_alternative.has_transcript()); 455 DCHECK(ws_alternative.has_transcript());
456 // TODO(hans): Perhaps the transcript should be required in the proto? 456 // TODO(hans): Perhaps the transcript should be required in the proto?
457 if (ws_alternative.has_transcript()) 457 if (ws_alternative.has_transcript())
458 hypothesis.utterance = UTF8ToUTF16(ws_alternative.transcript()); 458 hypothesis.utterance = base::UTF8ToUTF16(ws_alternative.transcript());
459 459
460 result.hypotheses.push_back(hypothesis); 460 result.hypotheses.push_back(hypothesis);
461 } 461 }
462 } 462 }
463 463
464 delegate()->OnSpeechRecognitionEngineResults(results); 464 delegate()->OnSpeechRecognitionEngineResults(results);
465 465
466 return state_; 466 return state_;
467 } 467 }
468 468
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 } 586 }
587 587
588 GoogleStreamingRemoteEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value) 588 GoogleStreamingRemoteEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value)
589 : event(event_value) { 589 : event(event_value) {
590 } 590 }
591 591
592 GoogleStreamingRemoteEngine::FSMEventArgs::~FSMEventArgs() { 592 GoogleStreamingRemoteEngine::FSMEventArgs::~FSMEventArgs() {
593 } 593 }
594 594
595 } // namespace content 595 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698