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

Unified Diff: android_webview/browser/net/android_stream_reader_url_request_job.cc

Issue 1563633002: Make URLRequestJob::SetStatus private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix stuff Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/net/android_stream_reader_url_request_job.cc
diff --git a/android_webview/browser/net/android_stream_reader_url_request_job.cc b/android_webview/browser/net/android_stream_reader_url_request_job.cc
index 25018cfe986dc6cc00ddd42767490eb2950ee281..7ad10928dc9eaa163457506186c0690c923d3ba0 100644
--- a/android_webview/browser/net/android_stream_reader_url_request_job.cc
+++ b/android_webview/browser/net/android_stream_reader_url_request_job.cc
@@ -174,8 +174,6 @@ void AndroidStreamReaderURLRequestJob::OnInputStreamOpened(
if (restart_required) {
NotifyRestartRequired();
} else {
- // Clear the IO_PENDING status set in Start().
- SetStatus(net::URLRequestStatus());
HeadersComplete(kHTTPNotFound, kHTTPNotFoundText);
}
return;
@@ -201,8 +199,6 @@ void AndroidStreamReaderURLRequestJob::OnInputStreamOpened(
void AndroidStreamReaderURLRequestJob::OnReaderSeekCompleted(int result) {
DCHECK(thread_checker_.CalledOnValidThread());
- // Clear the IO_PENDING status set in Start().
- SetStatus(net::URLRequestStatus());
if (result >= 0) {
set_expected_content_size(result);
HeadersComplete(kHTTPOk, kHTTPOkText);
@@ -252,10 +248,6 @@ bool AndroidStreamReaderURLRequestJob::GetMimeType(
if (!input_stream_reader_wrapper_.get())
return false;
- // Since it's possible for this call to alter the InputStream a
- // Seek or ReadRawData operation running in the background is not permitted.
- DCHECK(!request_->status().is_io_pending());
mmenke 2016/01/07 15:54:55 This removal is needed because this used to partia
Randy Smith (Not in Mondays) 2016/01/11 02:27:48 Is it worth replacing the DCHECK with one based on
mmenke 2016/01/11 06:17:11 I've been trying to avoid learning this class, so
-
return delegate_->GetMimeType(
env, request(), input_stream_reader_wrapper_->input_stream(), mime_type);
}
@@ -295,10 +287,6 @@ void AndroidStreamReaderURLRequestJob::DoStart() {
range_parse_result_));
return;
}
- // Start reading asynchronously so that all error reporting and data
- // callbacks happen as they would for network requests.
- SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING,
- net::ERR_IO_PENDING));
// This could be done in the InputStreamReader but would force more
// complex synchronization in the delegate.

Powered by Google App Engine
This is Rietveld 408576698