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

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

Issue 14578004: Support range uploading of a file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
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 // This file contains URLFetcher, a wrapper around URLRequest that handles 5 // This file contains URLFetcher, a wrapper around URLRequest that handles
6 // low-level details like thread safety, ref counting, and incremental buffer 6 // low-level details like thread safety, ref counting, and incremental buffer
7 // reading. This is useful for callers who simply want to get the data from a 7 // reading. This is useful for callers who simply want to get the data from a
8 // URL and don't care about all the nitty-gritty details. 8 // URL and don't care about all the nitty-gritty details.
9 // 9 //
10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a
(...skipping 22 matching lines...) Expand all
33 RequestType request_type, 33 RequestType request_type,
34 URLFetcherDelegate* d); 34 URLFetcherDelegate* d);
35 virtual ~URLFetcherImpl(); 35 virtual ~URLFetcherImpl();
36 36
37 // URLFetcher implementation: 37 // URLFetcher implementation:
38 virtual void SetUploadData(const std::string& upload_content_type, 38 virtual void SetUploadData(const std::string& upload_content_type,
39 const std::string& upload_content) OVERRIDE; 39 const std::string& upload_content) OVERRIDE;
40 virtual void SetUploadFilePath( 40 virtual void SetUploadFilePath(
41 const std::string& upload_content_type, 41 const std::string& upload_content_type,
42 const base::FilePath& file_path, 42 const base::FilePath& file_path,
43 uint64 range_offset,
44 uint64 range_length,
43 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; 45 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE;
44 virtual void SetChunkedUpload( 46 virtual void SetChunkedUpload(
45 const std::string& upload_content_type) OVERRIDE; 47 const std::string& upload_content_type) OVERRIDE;
46 virtual void AppendChunkToUpload(const std::string& data, 48 virtual void AppendChunkToUpload(const std::string& data,
47 bool is_last_chunk) OVERRIDE; 49 bool is_last_chunk) OVERRIDE;
48 virtual void SetLoadFlags(int load_flags) OVERRIDE; 50 virtual void SetLoadFlags(int load_flags) OVERRIDE;
49 virtual int GetLoadFlags() const OVERRIDE; 51 virtual int GetLoadFlags() const OVERRIDE;
50 virtual void SetReferrer(const std::string& referrer) OVERRIDE; 52 virtual void SetReferrer(const std::string& referrer) OVERRIDE;
51 virtual void SetExtraRequestHeaders( 53 virtual void SetExtraRequestHeaders(
52 const std::string& extra_request_headers) OVERRIDE; 54 const std::string& extra_request_headers) OVERRIDE;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 static int GetNumFetcherCores(); 119 static int GetNumFetcherCores();
118 120
119 const scoped_refptr<URLFetcherCore> core_; 121 const scoped_refptr<URLFetcherCore> core_;
120 122
121 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); 123 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl);
122 }; 124 };
123 125
124 } // namespace net 126 } // namespace net
125 127
126 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ 128 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698