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

Side by Side Diff: net/url_request/url_request_job.cc

Issue 169014: Remove URLRequest::Restart() because it is only referenced by unit tests (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_job.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "net/base/auth.h" 9 #include "net/base/auth.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 } 528 }
529 } 529 }
530 530
531 void URLRequestJob::NotifyCanceled() { 531 void URLRequestJob::NotifyCanceled() {
532 if (!done_) { 532 if (!done_) {
533 NotifyDone(URLRequestStatus(URLRequestStatus::CANCELED, 533 NotifyDone(URLRequestStatus(URLRequestStatus::CANCELED,
534 net::ERR_ABORTED)); 534 net::ERR_ABORTED));
535 } 535 }
536 } 536 }
537 537
538 void URLRequestJob::NotifyRestartRequired() {
539 DCHECK(!has_handled_response_);
540 if (GetStatus().status() != URLRequestStatus::CANCELED)
541 request_->Restart();
542 }
543
544 bool URLRequestJob::FilterHasData() { 538 bool URLRequestJob::FilterHasData() {
545 return filter_.get() && filter_->stream_data_len(); 539 return filter_.get() && filter_->stream_data_len();
546 } 540 }
547 541
548 void URLRequestJob::RecordBytesRead(int bytes_read) { 542 void URLRequestJob::RecordBytesRead(int bytes_read) {
549 if (is_profiling()) { 543 if (is_profiling()) {
550 ++(metrics_->number_of_read_IO_); 544 ++(metrics_->number_of_read_IO_);
551 metrics_->total_bytes_read_ += bytes_read; 545 metrics_->total_bytes_read_ += bytes_read;
552 } 546 }
553 filter_input_byte_count_ += bytes_read; 547 filter_input_byte_count_ += bytes_read;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 packet_times_[4] - packet_times_[3], 722 packet_times_[4] - packet_times_[3],
729 base::TimeDelta::FromMilliseconds(1), 723 base::TimeDelta::FromMilliseconds(1),
730 base::TimeDelta::FromSeconds(10), 100); 724 base::TimeDelta::FromSeconds(10), 100);
731 return; 725 return;
732 } 726 }
733 default: 727 default:
734 NOTREACHED(); 728 NOTREACHED();
735 return; 729 return;
736 } 730 }
737 } 731 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_job.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698