Chromium Code Reviews| 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 "content/common/net/url_fetcher_impl.h" | 5 #include "content/common/net/url_fetcher_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 807 if (!upload_content_.empty()) { | 807 if (!upload_content_.empty()) { |
| 808 request_->AppendBytesToUpload( | 808 request_->AppendBytesToUpload( |
| 809 upload_content_.data(), static_cast<int>(upload_content_.length())); | 809 upload_content_.data(), static_cast<int>(upload_content_.length())); |
| 810 } | 810 } |
| 811 break; | 811 break; |
| 812 | 812 |
| 813 case HEAD: | 813 case HEAD: |
| 814 request_->set_method("HEAD"); | 814 request_->set_method("HEAD"); |
| 815 break; | 815 break; |
| 816 | 816 |
| 817 case DELETE: | |
|
wtc
2011/12/13 20:20:06
This should be
case DELETE_REQUEST:
zel
2011/12/13 20:25:53
Done.
| |
| 818 request_->set_method("DELETE"); | |
| 819 break; | |
| 820 | |
| 817 default: | 821 default: |
| 818 NOTREACHED(); | 822 NOTREACHED(); |
| 819 } | 823 } |
| 820 | 824 |
| 821 if (!extra_request_headers_.IsEmpty()) | 825 if (!extra_request_headers_.IsEmpty()) |
| 822 request_->SetExtraRequestHeaders(extra_request_headers_); | 826 request_->SetExtraRequestHeaders(extra_request_headers_); |
| 823 | 827 |
| 824 // There might be data left over from a previous request attempt. | 828 // There might be data left over from a previous request attempt. |
| 825 data_.clear(); | 829 data_.clear(); |
| 826 | 830 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1121 | 1125 |
| 1122 // static | 1126 // static |
| 1123 content::URLFetcherFactory* URLFetcherImpl::factory() { | 1127 content::URLFetcherFactory* URLFetcherImpl::factory() { |
| 1124 return g_factory; | 1128 return g_factory; |
| 1125 } | 1129 } |
| 1126 | 1130 |
| 1127 // static | 1131 // static |
| 1128 void URLFetcherImpl::set_factory(content::URLFetcherFactory* factory) { | 1132 void URLFetcherImpl::set_factory(content::URLFetcherFactory* factory) { |
| 1129 g_factory = factory; | 1133 g_factory = factory; |
| 1130 } | 1134 } |
| OLD | NEW |