Update optimize_png_files.sh to work on msysgit bash.
[chromium-blink-merge.git] / net / url_request / url_range_request_job.h
blob85f394c0e9449a4b24833a487c76bcee6345eac8
1 // Copyright 2014 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.
5 #ifndef NET_URL_REQUEST_URL_RANGE_REQUEST_JOB_H_
6 #define NET_URL_REQUEST_URL_RANGE_REQUEST_JOB_H_
8 #include <vector>
10 #include "net/base/net_export.h"
11 #include "net/http/http_byte_range.h"
12 #include "net/url_request/url_request_job.h"
14 namespace net {
16 class HttpRequestHeaders;
18 // URLRequestJob with support for parsing range requests.
19 // It is up to subclasses to handle the response
20 // and deal with an errors parsing the range request header.
21 // This must be done after Start() has been called.
22 class NET_EXPORT URLRangeRequestJob : public URLRequestJob {
23 public:
24 URLRangeRequestJob(URLRequest* request,
25 NetworkDelegate* delegate);
27 virtual void SetExtraRequestHeaders(
28 const HttpRequestHeaders& headers) OVERRIDE;
30 const std::vector<HttpByteRange>& ranges() const { return ranges_; }
31 int range_parse_result() const { return range_parse_result_; }
33 protected:
34 virtual ~URLRangeRequestJob();
36 private:
37 std::vector<HttpByteRange> ranges_;
38 int range_parse_result_;
41 } // namespace net
43 #endif // NET_URL_REQUEST_URL_RANGE_REQUEST_JOB_H_