| 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 "content/browser/speech/speech_recognition_engine.h" | 5 #include "content/browser/speech/speech_recognition_engine.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/big_endian.h" | 10 #include "base/big_endian.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 | 130 |
| 131 void SpeechRecognitionEngine::OnURLFetchComplete(const URLFetcher* source) { | 131 void SpeechRecognitionEngine::OnURLFetchComplete(const URLFetcher* source) { |
| 132 const bool kResponseComplete = true; | 132 const bool kResponseComplete = true; |
| 133 DispatchHTTPResponse(source, kResponseComplete); | 133 DispatchHTTPResponse(source, kResponseComplete); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void SpeechRecognitionEngine::OnURLFetchDownloadProgress( | 136 void SpeechRecognitionEngine::OnURLFetchDownloadProgress( |
| 137 const URLFetcher* source, | 137 const URLFetcher* source, |
| 138 int64_t current, | 138 int64_t current, |
| 139 int64_t total) { | 139 int64_t total, |
| 140 int64_t current_network_bytes) { |
| 140 const bool kPartialResponse = false; | 141 const bool kPartialResponse = false; |
| 141 DispatchHTTPResponse(source, kPartialResponse); | 142 DispatchHTTPResponse(source, kPartialResponse); |
| 142 } | 143 } |
| 143 | 144 |
| 144 void SpeechRecognitionEngine::DispatchHTTPResponse(const URLFetcher* source, | 145 void SpeechRecognitionEngine::DispatchHTTPResponse(const URLFetcher* source, |
| 145 bool end_of_response) { | 146 bool end_of_response) { |
| 146 DCHECK(CalledOnValidThread()); | 147 DCHECK(CalledOnValidThread()); |
| 147 DCHECK(source); | 148 DCHECK(source); |
| 148 const bool response_is_good = source->GetStatus().is_success() && | 149 const bool response_is_good = source->GetStatus().is_success() && |
| 149 source->GetResponseCode() == 200; | 150 source->GetResponseCode() == 200; |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 } | 643 } |
| 643 | 644 |
| 644 SpeechRecognitionEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value) | 645 SpeechRecognitionEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value) |
| 645 : event(event_value) { | 646 : event(event_value) { |
| 646 } | 647 } |
| 647 | 648 |
| 648 SpeechRecognitionEngine::FSMEventArgs::~FSMEventArgs() { | 649 SpeechRecognitionEngine::FSMEventArgs::~FSMEventArgs() { |
| 649 } | 650 } |
| 650 | 651 |
| 651 } // namespace content | 652 } // namespace content |
| OLD | NEW |