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

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: Response to comments 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());
-
return delegate_->GetMimeType(
mmenke 2016/01/15 18:31:05 request_->status() is now managed by net, so it ha
mnaganov (inactive) 2016/01/15 19:04:58 I think it should be fine, thanks for letting us k
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