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

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

Issue 12383015: Add SetUploadFilePath method to URLFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 7 years, 9 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_fetcher_impl.h ('k') | net/url_request/url_fetcher_impl_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) 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 11 matching lines...) Expand all
22 22
23 URLFetcherImpl::~URLFetcherImpl() { 23 URLFetcherImpl::~URLFetcherImpl() {
24 core_->Stop(); 24 core_->Stop();
25 } 25 }
26 26
27 void URLFetcherImpl::SetUploadData(const std::string& upload_content_type, 27 void URLFetcherImpl::SetUploadData(const std::string& upload_content_type,
28 const std::string& upload_content) { 28 const std::string& upload_content) {
29 core_->SetUploadData(upload_content_type, upload_content); 29 core_->SetUploadData(upload_content_type, upload_content);
30 } 30 }
31 31
32 void URLFetcherImpl::SetUploadFilePath(
33 const std::string& upload_content_type,
34 const base::FilePath& file_path,
35 scoped_refptr<base::TaskRunner> file_task_runner) {
36 core_->SetUploadFilePath(upload_content_type, file_path, file_task_runner);
37 }
38
32 void URLFetcherImpl::SetChunkedUpload(const std::string& content_type) { 39 void URLFetcherImpl::SetChunkedUpload(const std::string& content_type) {
33 core_->SetChunkedUpload(content_type); 40 core_->SetChunkedUpload(content_type);
34 } 41 }
35 42
36 void URLFetcherImpl::AppendChunkToUpload(const std::string& data, 43 void URLFetcherImpl::AppendChunkToUpload(const std::string& data,
37 bool is_last_chunk) { 44 bool is_last_chunk) {
38 DCHECK(data.length()); 45 DCHECK(data.length());
39 core_->AppendChunkToUpload(data, is_last_chunk); 46 core_->AppendChunkToUpload(data, is_last_chunk);
40 } 47 }
41 48
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 URLFetcherFactory* URLFetcherImpl::factory() { 208 URLFetcherFactory* URLFetcherImpl::factory() {
202 return g_factory; 209 return g_factory;
203 } 210 }
204 211
205 // static 212 // static
206 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { 213 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) {
207 g_factory = factory; 214 g_factory = factory;
208 } 215 }
209 216
210 } // namespace net 217 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher_impl.h ('k') | net/url_request/url_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698