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/test_url_fetcher_factory.h" | 5 #include "net/url_request/test_url_fetcher_factory.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 void TestURLFetcher::SetUploadData(const std::string& upload_content_type, | 55 void TestURLFetcher::SetUploadData(const std::string& upload_content_type, |
56 const std::string& upload_content) { | 56 const std::string& upload_content) { |
57 upload_data_ = upload_content; | 57 upload_data_ = upload_content; |
58 } | 58 } |
59 | 59 |
60 void TestURLFetcher::SetUploadFilePath( | 60 void TestURLFetcher::SetUploadFilePath( |
61 const std::string& upload_content_type, | 61 const std::string& upload_content_type, |
62 const base::FilePath& file_path, | 62 const base::FilePath& file_path, |
| 63 uint64 range_offset, |
| 64 uint64 range_length, |
63 scoped_refptr<base::TaskRunner> file_task_runner) { | 65 scoped_refptr<base::TaskRunner> file_task_runner) { |
64 upload_file_path_ = file_path; | 66 upload_file_path_ = file_path; |
65 } | 67 } |
66 | 68 |
67 void TestURLFetcher::SetChunkedUpload(const std::string& upload_content_type) { | 69 void TestURLFetcher::SetChunkedUpload(const std::string& upload_content_type) { |
68 } | 70 } |
69 | 71 |
70 void TestURLFetcher::AppendChunkToUpload(const std::string& data, | 72 void TestURLFetcher::AppendChunkToUpload(const std::string& data, |
71 bool is_last_chunk) { | 73 bool is_last_chunk) { |
72 DCHECK(!did_receive_last_chunk_); | 74 DCHECK(!did_receive_last_chunk_); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 374 |
373 URLFetcher* URLFetcherImplFactory::CreateURLFetcher( | 375 URLFetcher* URLFetcherImplFactory::CreateURLFetcher( |
374 int id, | 376 int id, |
375 const GURL& url, | 377 const GURL& url, |
376 URLFetcher::RequestType request_type, | 378 URLFetcher::RequestType request_type, |
377 URLFetcherDelegate* d) { | 379 URLFetcherDelegate* d) { |
378 return new URLFetcherImpl(url, request_type, d); | 380 return new URLFetcherImpl(url, request_type, d); |
379 } | 381 } |
380 | 382 |
381 } // namespace net | 383 } // namespace net |
OLD | NEW |