Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_URL_REQUEST_URL_RANGE_REQUEST_JOB_H_ | |
| 6 #define NET_URL_REQUEST_URL_RANGE_REQUEST_JOB_H_ | |
| 7 | |
| 8 #include "net/base/net_export.h" | |
| 9 #include "net/http/http_byte_range.h" | |
| 10 #include "net/url_request/url_request_job.h" | |
| 11 | |
| 12 namespace net { | |
| 13 | |
| 14 class HttpRequestHeaders; | |
| 15 | |
| 16 // URLRequestJob with support for parsing range requests. | |
| 17 // It is up to subclasses to handle the response, | |
|
mmenke
2014/01/09 15:49:24
nit: Comma not needed.
| |
| 18 // and pass any errors parsing the ranges after Start() has been called. | |
|
mmenke
2014/01/09 15:49:24
nit: This isn't clear. Maybe "and deal with an e
| |
| 19 class NET_EXPORT URLRangeRequestJob : public URLRequestJob { | |
| 20 public: | |
| 21 URLRangeRequestJob(URLRequest* request, | |
| 22 NetworkDelegate* delegate); | |
| 23 | |
| 24 virtual void SetExtraRequestHeaders( | |
| 25 const HttpRequestHeaders& headers) OVERRIDE; | |
| 26 | |
| 27 const std::vector<HttpByteRange>& ranges() const { return ranges_; } | |
| 28 int range_parse_result() const { return range_parse_result_; } | |
| 29 | |
| 30 protected: | |
| 31 virtual ~URLRangeRequestJob(); | |
| 32 | |
| 33 private: | |
| 34 std::vector<HttpByteRange> ranges_; | |
| 35 int range_parse_result_; | |
| 36 }; | |
| 37 | |
| 38 } // namespace net | |
| 39 | |
| 40 #endif // NET_URL_REQUEST_URL_RANGE_REQUEST_JOB_H_ | |
| OLD | NEW |