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_fetcher_core.h" | 5 #include "net/url_request/url_fetcher_core.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 809 CancelURLRequest(result); | 809 CancelURLRequest(result); |
| 810 delegate_task_runner_->PostTask( | 810 delegate_task_runner_->PostTask( |
| 811 FROM_HERE, | 811 FROM_HERE, |
| 812 base::Bind(&URLFetcherCore::InformDelegateFetchIsComplete, this)); | 812 base::Bind(&URLFetcherCore::InformDelegateFetchIsComplete, this)); |
| 813 } | 813 } |
| 814 | 814 |
| 815 void URLFetcherCore::ReleaseRequest() { | 815 void URLFetcherCore::ReleaseRequest() { |
| 816 request_context_getter_->RemoveObserver(this); | 816 request_context_getter_->RemoveObserver(this); |
| 817 upload_progress_checker_timer_.reset(); | 817 upload_progress_checker_timer_.reset(); |
| 818 request_.reset(); | 818 request_.reset(); |
| 819 buffer_ = nullptr; | |
|
mmenke
2017/01/25 16:12:30
BUG: In some cases, URLFetcherCores retry request
xunjieli
2017/01/25 16:28:15
Done. Thanks! I forgot about the retry on 5xx and
| |
| 819 g_registry.Get().RemoveURLFetcherCore(this); | 820 g_registry.Get().RemoveURLFetcherCore(this); |
| 820 } | 821 } |
| 821 | 822 |
| 822 base::TimeTicks URLFetcherCore::GetBackoffReleaseTime() { | 823 base::TimeTicks URLFetcherCore::GetBackoffReleaseTime() { |
| 823 DCHECK(network_task_runner_->BelongsToCurrentThread()); | 824 DCHECK(network_task_runner_->BelongsToCurrentThread()); |
| 824 | 825 |
| 825 if (!original_url_throttler_entry_.get()) | 826 if (!original_url_throttler_entry_.get()) |
| 826 return base::TimeTicks(); | 827 return base::TimeTicks(); |
| 827 | 828 |
| 828 base::TimeTicks original_url_backoff = | 829 base::TimeTicks original_url_backoff = |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 952 } | 953 } |
| 953 | 954 |
| 954 void URLFetcherCore::AssertHasNoUploadData() const { | 955 void URLFetcherCore::AssertHasNoUploadData() const { |
| 955 DCHECK(!upload_content_set_); | 956 DCHECK(!upload_content_set_); |
| 956 DCHECK(upload_content_.empty()); | 957 DCHECK(upload_content_.empty()); |
| 957 DCHECK(upload_file_path_.empty()); | 958 DCHECK(upload_file_path_.empty()); |
| 958 DCHECK(upload_stream_factory_.is_null()); | 959 DCHECK(upload_stream_factory_.is_null()); |
| 959 } | 960 } |
| 960 | 961 |
| 961 } // namespace net | 962 } // namespace net |
| OLD | NEW |