OLD | NEW |
1 // Copyright (c) 20010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 20010 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 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/scoped_callback_factory.h" | 10 #include "base/scoped_callback_factory.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace webkit_blob { | 23 namespace webkit_blob { |
24 | 24 |
25 // A request job that handles reading blob URLs. | 25 // A request job that handles reading blob URLs. |
26 class BlobURLRequestJob : public net::URLRequestJob { | 26 class BlobURLRequestJob : public net::URLRequestJob { |
27 public: | 27 public: |
28 BlobURLRequestJob(net::URLRequest* request, | 28 BlobURLRequestJob(net::URLRequest* request, |
29 BlobData* blob_data, | 29 BlobData* blob_data, |
30 base::MessageLoopProxy* resolving_message_loop_proxy); | 30 base::MessageLoopProxy* resolving_message_loop_proxy); |
31 virtual ~BlobURLRequestJob(); | 31 virtual ~BlobURLRequestJob(); |
32 | 32 |
33 // URLRequestJob methods. | 33 // net::URLRequestJob methods. |
34 virtual void Start(); | 34 virtual void Start(); |
35 virtual void Kill(); | 35 virtual void Kill(); |
36 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); | 36 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); |
37 virtual bool GetMimeType(std::string* mime_type) const; | 37 virtual bool GetMimeType(std::string* mime_type) const; |
38 virtual void GetResponseInfo(net::HttpResponseInfo* info); | 38 virtual void GetResponseInfo(net::HttpResponseInfo* info); |
39 virtual int GetResponseCode() const; | 39 virtual int GetResponseCode() const; |
40 virtual void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers); | 40 virtual void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers); |
41 | 41 |
42 private: | 42 private: |
43 void ResolveFile(const FilePath& file_path); | 43 void ResolveFile(const FilePath& file_path); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool byte_range_set_; | 78 bool byte_range_set_; |
79 net::HttpByteRange byte_range_; | 79 net::HttpByteRange byte_range_; |
80 scoped_ptr<net::HttpResponseInfo> response_info_; | 80 scoped_ptr<net::HttpResponseInfo> response_info_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); | 82 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace webkit_blob | 85 } // namespace webkit_blob |
86 | 86 |
87 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 87 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
OLD | NEW |