| 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_impl.h" | 5 #include "net/url_request/url_fetcher_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
| 9 #include "net/url_request/url_fetcher_core.h" | 9 #include "net/url_request/url_fetcher_core.h" |
| 10 #include "net/url_request/url_fetcher_factory.h" | 10 #include "net/url_request/url_fetcher_factory.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 } | 24 } |
| 25 | 25 |
| 26 void URLFetcherImpl::SetUploadData(const std::string& upload_content_type, | 26 void URLFetcherImpl::SetUploadData(const std::string& upload_content_type, |
| 27 const std::string& upload_content) { | 27 const std::string& upload_content) { |
| 28 core_->SetUploadData(upload_content_type, upload_content); | 28 core_->SetUploadData(upload_content_type, upload_content); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void URLFetcherImpl::SetUploadFilePath( | 31 void URLFetcherImpl::SetUploadFilePath( |
| 32 const std::string& upload_content_type, | 32 const std::string& upload_content_type, |
| 33 const base::FilePath& file_path, | 33 const base::FilePath& file_path, |
| 34 uint64 range_offset, |
| 35 uint64 range_length, |
| 34 scoped_refptr<base::TaskRunner> file_task_runner) { | 36 scoped_refptr<base::TaskRunner> file_task_runner) { |
| 35 core_->SetUploadFilePath(upload_content_type, file_path, file_task_runner); | 37 core_->SetUploadFilePath(upload_content_type, |
| 38 file_path, |
| 39 range_offset, |
| 40 range_length, |
| 41 file_task_runner); |
| 36 } | 42 } |
| 37 | 43 |
| 38 void URLFetcherImpl::SetChunkedUpload(const std::string& content_type) { | 44 void URLFetcherImpl::SetChunkedUpload(const std::string& content_type) { |
| 39 core_->SetChunkedUpload(content_type); | 45 core_->SetChunkedUpload(content_type); |
| 40 } | 46 } |
| 41 | 47 |
| 42 void URLFetcherImpl::AppendChunkToUpload(const std::string& data, | 48 void URLFetcherImpl::AppendChunkToUpload(const std::string& data, |
| 43 bool is_last_chunk) { | 49 bool is_last_chunk) { |
| 44 DCHECK(data.length()); | 50 DCHECK(data.length()); |
| 45 core_->AppendChunkToUpload(data, is_last_chunk); | 51 core_->AppendChunkToUpload(data, is_last_chunk); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 URLFetcherFactory* URLFetcherImpl::factory() { | 212 URLFetcherFactory* URLFetcherImpl::factory() { |
| 207 return g_factory; | 213 return g_factory; |
| 208 } | 214 } |
| 209 | 215 |
| 210 // static | 216 // static |
| 211 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { | 217 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { |
| 212 g_factory = factory; | 218 g_factory = factory; |
| 213 } | 219 } |
| 214 | 220 |
| 215 } // namespace net | 221 } // namespace net |
| OLD | NEW |