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

Side by Side Diff: content/public/common/speech_recognition_result.h

Issue 10386130: Coverity: Fix pass by value error in SpeechRecognitionHypothesis constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_ 6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 struct SpeechRecognitionHypothesis { 17 struct SpeechRecognitionHypothesis {
18 string16 utterance; 18 string16 utterance;
19 double confidence; 19 double confidence;
20 20
21 SpeechRecognitionHypothesis() : confidence(0.0) {} 21 SpeechRecognitionHypothesis() : confidence(0.0) {}
22 22
23 SpeechRecognitionHypothesis(const string16 utterance_value, 23 SpeechRecognitionHypothesis(const string16& utterance_value,
24 double confidence_value) 24 double confidence_value)
25 : utterance(utterance_value), 25 : utterance(utterance_value),
26 confidence(confidence_value) { 26 confidence(confidence_value) {
27 } 27 }
28 }; 28 };
29 29
30 typedef std::vector<SpeechRecognitionHypothesis> 30 typedef std::vector<SpeechRecognitionHypothesis>
31 SpeechRecognitionHypothesisArray; 31 SpeechRecognitionHypothesisArray;
32 32
33 struct CONTENT_EXPORT SpeechRecognitionResult { 33 struct CONTENT_EXPORT SpeechRecognitionResult {
34 SpeechRecognitionHypothesisArray hypotheses; 34 SpeechRecognitionHypothesisArray hypotheses;
35 35
36 SpeechRecognitionResult(); 36 SpeechRecognitionResult();
37 ~SpeechRecognitionResult(); 37 ~SpeechRecognitionResult();
38 }; 38 };
39 39
40 } // namespace content 40 } // namespace content
41 41
42 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_ 42 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698