summaryrefslogtreecommitdiffstats
path: root/content/browser/speech
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2015-08-05 09:34:55 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-05 16:35:50 +0000
commit5c411d94add205780f6e6c701aecc9b297d885b0 (patch)
treeb4a93ddcd9e50354b8d269c643767ac09592e85e /content/browser/speech
parentaa0bbfd03137269c065c170442422f9d2015ac4c (diff)
downloadchromium_src-5c411d94add205780f6e6c701aecc9b297d885b0.zip
chromium_src-5c411d94add205780f6e6c701aecc9b297d885b0.tar.gz
chromium_src-5c411d94add205780f6e6c701aecc9b297d885b0.tar.bz2
Fix all failed and canceled URLRequestStatuses without errors.
As a step towards removing URLRequestStatus::Status, stop creating FAILED and CANCELED URLRequestStatuses without supplying an error. IO_PENDING is left for later as that'll want a bit more careful auditing of error() callers. BUG=490311 Review URL: https://codereview.chromium.org/1239993004 Cr-Commit-Position: refs/heads/master@{#341913}
Diffstat (limited to 'content/browser/speech')
-rw-r--r--content/browser/speech/google_streaming_remote_engine_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/browser/speech/google_streaming_remote_engine_unittest.cc b/content/browser/speech/google_streaming_remote_engine_unittest.cc
index c3d7ce5..adc8bad 100644
--- a/content/browser/speech/google_streaming_remote_engine_unittest.cc
+++ b/content/browser/speech/google_streaming_remote_engine_unittest.cc
@@ -15,6 +15,7 @@
#include "content/browser/speech/proto/google_streaming_api.pb.h"
#include "content/public/common/speech_recognition_error.h"
#include "content/public/common/speech_recognition_result.h"
+#include "net/base/net_errors.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_status.h"
@@ -499,10 +500,9 @@ void GoogleStreamingRemoteEngineTest::CloseMockDownstream(
TestURLFetcher* downstream_fetcher = GetDownstreamFetcher();
ASSERT_TRUE(downstream_fetcher);
- const URLRequestStatus::Status fetcher_status =
- (error == DOWNSTREAM_ERROR_NETWORK) ? URLRequestStatus::FAILED :
- URLRequestStatus::SUCCESS;
- downstream_fetcher->set_status(URLRequestStatus(fetcher_status, 0));
+ const net::Error net_error =
+ (error == DOWNSTREAM_ERROR_NETWORK) ? net::ERR_FAILED : net::OK;
+ downstream_fetcher->set_status(URLRequestStatus::FromError(net_error));
downstream_fetcher->set_response_code(
(error == DOWNSTREAM_ERROR_HTTP500) ? 500 : 200);