OLD | NEW |
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 <queue> | 5 #include <queue> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/speech/audio_buffer.h" | 10 #include "content/browser/speech/audio_buffer.h" |
11 #include "content/browser/speech/google_streaming_remote_engine.h" | 11 #include "content/browser/speech/google_streaming_remote_engine.h" |
12 #include "content/browser/speech/proto/google_streaming_api.pb.h" | 12 #include "content/browser/speech/proto/google_streaming_api.pb.h" |
13 #include "content/public/common/speech_recognition_error.h" | 13 #include "content/public/common/speech_recognition_error.h" |
14 #include "content/public/common/speech_recognition_result.h" | 14 #include "content/public/common/speech_recognition_result.h" |
15 #include "net/url_request/test_url_fetcher_factory.h" | 15 #include "net/url_request/test_url_fetcher_factory.h" |
16 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
17 #include "net/url_request/url_request_status.h" | 17 #include "net/url_request/url_request_status.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 std::string GoogleStreamingRemoteEngineTest::ToBigEndian32(uint32 value) { | 494 std::string GoogleStreamingRemoteEngineTest::ToBigEndian32(uint32 value) { |
495 char raw_data[4]; | 495 char raw_data[4]; |
496 raw_data[0] = static_cast<uint8>((value >> 24) & 0xFF); | 496 raw_data[0] = static_cast<uint8>((value >> 24) & 0xFF); |
497 raw_data[1] = static_cast<uint8>((value >> 16) & 0xFF); | 497 raw_data[1] = static_cast<uint8>((value >> 16) & 0xFF); |
498 raw_data[2] = static_cast<uint8>((value >> 8) & 0xFF); | 498 raw_data[2] = static_cast<uint8>((value >> 8) & 0xFF); |
499 raw_data[3] = static_cast<uint8>(value & 0xFF); | 499 raw_data[3] = static_cast<uint8>(value & 0xFF); |
500 return std::string(raw_data, sizeof(raw_data)); | 500 return std::string(raw_data, sizeof(raw_data)); |
501 } | 501 } |
502 | 502 |
503 } // namespace content | 503 } // namespace content |
OLD | NEW |