OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 NotifyDone(URLRequestStatus(URLRequestStatus::CANCELED, ERR_ABORTED)); | 432 NotifyDone(URLRequestStatus(URLRequestStatus::CANCELED, ERR_ABORTED)); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 void URLRequestJob::NotifyRestartRequired() { | 436 void URLRequestJob::NotifyRestartRequired() { |
437 DCHECK(!has_handled_response_); | 437 DCHECK(!has_handled_response_); |
438 if (GetStatus().status() != URLRequestStatus::CANCELED) | 438 if (GetStatus().status() != URLRequestStatus::CANCELED) |
439 request_->Restart(); | 439 request_->Restart(); |
440 } | 440 } |
441 | 441 |
| 442 void URLRequestJob::SetBlockedOnDelegate() { |
| 443 request_->SetBlockedOnDelegate(); |
| 444 } |
| 445 |
| 446 void URLRequestJob::SetUnblockedOnDelegate() { |
| 447 request_->SetUnblockedOnDelegate(); |
| 448 } |
| 449 |
442 bool URLRequestJob::ReadRawData(IOBuffer* buf, int buf_size, | 450 bool URLRequestJob::ReadRawData(IOBuffer* buf, int buf_size, |
443 int *bytes_read) { | 451 int *bytes_read) { |
444 DCHECK(bytes_read); | 452 DCHECK(bytes_read); |
445 *bytes_read = 0; | 453 *bytes_read = 0; |
446 return true; | 454 return true; |
447 } | 455 } |
448 | 456 |
449 void URLRequestJob::FilteredDataRead(int bytes_read) { | 457 void URLRequestJob::FilteredDataRead(int bytes_read) { |
450 DCHECK(filter_.get()); // don't add data if there is no filter | 458 DCHECK(filter_.get()); // don't add data if there is no filter |
451 filter_->FlushStreamBuffer(bytes_read); | 459 filter_->FlushStreamBuffer(bytes_read); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 } | 677 } |
670 | 678 |
671 bool URLRequestJob::FilterHasData() { | 679 bool URLRequestJob::FilterHasData() { |
672 return filter_.get() && filter_->stream_data_len(); | 680 return filter_.get() && filter_->stream_data_len(); |
673 } | 681 } |
674 | 682 |
675 void URLRequestJob::UpdatePacketReadTimes() { | 683 void URLRequestJob::UpdatePacketReadTimes() { |
676 } | 684 } |
677 | 685 |
678 } // namespace net | 686 } // namespace net |
OLD | NEW |