Chromium Code Reviews| 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 "net/url_request/url_request_job.h" | 5 #include "net/url_request/url_request_job.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/power_monitor/power_monitor.h" | 10 #include "base/power_monitor/power_monitor.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 | 392 |
| 393 request_->NotifyResponseStarted(); | 393 request_->NotifyResponseStarted(); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void URLRequestJob::NotifyReadComplete(int bytes_read) { | 396 void URLRequestJob::NotifyReadComplete(int bytes_read) { |
| 397 if (!request_ || !request_->has_delegate()) | 397 if (!request_ || !request_->has_delegate()) |
| 398 return; // The request was destroyed, so there is no more work to do. | 398 return; // The request was destroyed, so there is no more work to do. |
| 399 | 399 |
| 400 // TODO(darin): Bug 1004233. Re-enable this test once all of the chrome | 400 // TODO(darin): Bug 1004233. Re-enable this test once all of the chrome |
| 401 // unit_tests have been fixed to not trip this. | 401 // unit_tests have been fixed to not trip this. |
| 402 //DCHECK(!request_->status().is_io_pending()); | 402 // DCHECK(!request_->status().is_io_pending()); |
|
wtc
2014/05/19 19:08:53
Nit: this isn't really a comment. Here we are comm
| |
| 403 | 403 |
| 404 // The headers should be complete before reads complete | 404 // The headers should be complete before reads complete |
| 405 DCHECK(has_handled_response_); | 405 DCHECK(has_handled_response_); |
| 406 | 406 |
| 407 OnRawReadComplete(bytes_read); | 407 OnRawReadComplete(bytes_read); |
| 408 | 408 |
| 409 // Don't notify if we had an error. | 409 // Don't notify if we had an error. |
| 410 if (!request_->status().is_success()) | 410 if (!request_->status().is_success()) |
| 411 return; | 411 return; |
| 412 | 412 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 759 } | 759 } |
| 760 | 760 |
| 761 bool URLRequestJob::FilterHasData() { | 761 bool URLRequestJob::FilterHasData() { |
| 762 return filter_.get() && filter_->stream_data_len(); | 762 return filter_.get() && filter_->stream_data_len(); |
| 763 } | 763 } |
| 764 | 764 |
| 765 void URLRequestJob::UpdatePacketReadTimes() { | 765 void URLRequestJob::UpdatePacketReadTimes() { |
| 766 } | 766 } |
| 767 | 767 |
| 768 } // namespace net | 768 } // namespace net |
| OLD | NEW |