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

Side by Side Diff: content/browser/speech/google_one_shot_remote_engine.cc

Issue 10703141: End-to-end browser tests for speech recognition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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_one_shot_remote_engine.h" 5 #include "content/browser/speech/google_one_shot_remote_engine.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 result->hypotheses.clear(); 141 result->hypotheses.clear();
142 return false; 142 return false;
143 } 143 }
144 return true; 144 return true;
145 } 145 }
146 146
147 } // namespace 147 } // namespace
148 148
149 namespace speech { 149 namespace speech {
150 150
151 const int GoogleOneShotRemoteEngine::kAudioPacketIntervalMs = 100;
152 int GoogleOneShotRemoteEngine::url_fetcher_id_for_tests = 0; 151 int GoogleOneShotRemoteEngine::url_fetcher_id_for_tests = 0;
153 152
154 GoogleOneShotRemoteEngine::GoogleOneShotRemoteEngine( 153 GoogleOneShotRemoteEngine::GoogleOneShotRemoteEngine(
155 net::URLRequestContextGetter* context) 154 net::URLRequestContextGetter* context)
156 : url_context_(context) { 155 : url_context_(context) {
157 } 156 }
158 157
159 GoogleOneShotRemoteEngine::~GoogleOneShotRemoteEngine() {} 158 GoogleOneShotRemoteEngine::~GoogleOneShotRemoteEngine() {}
160 159
161 void GoogleOneShotRemoteEngine::SetConfig( 160 void GoogleOneShotRemoteEngine::SetConfig(
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 281
283 bool GoogleOneShotRemoteEngine::IsRecognitionPending() const { 282 bool GoogleOneShotRemoteEngine::IsRecognitionPending() const {
284 return url_fetcher_ != NULL; 283 return url_fetcher_ != NULL;
285 } 284 }
286 285
287 int GoogleOneShotRemoteEngine::GetDesiredAudioChunkDurationMs() const { 286 int GoogleOneShotRemoteEngine::GetDesiredAudioChunkDurationMs() const {
288 return kAudioPacketIntervalMs; 287 return kAudioPacketIntervalMs;
289 } 288 }
290 289
291 } // namespace speech 290 } // namespace speech
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698