| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util_proxy.h" | 8 #include "base/files/file_util_proxy.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 FROM_HERE, | 752 FROM_HERE, |
| 753 base::TimeDelta::FromMilliseconds(kUploadProgressTimerInterval), | 753 base::TimeDelta::FromMilliseconds(kUploadProgressTimerInterval), |
| 754 this, | 754 this, |
| 755 &URLFetcherCore::InformDelegateUploadProgress); | 755 &URLFetcherCore::InformDelegateUploadProgress); |
| 756 break; | 756 break; |
| 757 | 757 |
| 758 case URLFetcher::POST_WITHOUT_BODY: | 758 case URLFetcher::POST_WITHOUT_BODY: |
| 759 request_->set_method("POST"); | 759 request_->set_method("POST"); |
| 760 break; | 760 break; |
| 761 | 761 |
| 762 case URLFetcher::PUT_WITHOUT_BODY: |
| 763 request_->set_method("PUT"); |
| 764 break; |
| 765 |
| 762 case URLFetcher::HEAD: | 766 case URLFetcher::HEAD: |
| 763 request_->set_method("HEAD"); | 767 request_->set_method("HEAD"); |
| 764 break; | 768 break; |
| 765 | 769 |
| 766 case URLFetcher::DELETE_REQUEST: | 770 case URLFetcher::DELETE_REQUEST: |
| 767 request_->set_method("DELETE"); | 771 request_->set_method("DELETE"); |
| 768 break; | 772 break; |
| 769 | 773 |
| 770 default: | 774 default: |
| 771 NOTREACHED(); | 775 NOTREACHED(); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 } | 1068 } |
| 1065 | 1069 |
| 1066 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread( | 1070 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread( |
| 1067 scoped_ptr<std::string> download_data) { | 1071 scoped_ptr<std::string> download_data) { |
| 1068 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); | 1072 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); |
| 1069 if (delegate_) | 1073 if (delegate_) |
| 1070 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass()); | 1074 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass()); |
| 1071 } | 1075 } |
| 1072 | 1076 |
| 1073 } // namespace net | 1077 } // namespace net |
| OLD | NEW |