| 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 13 matching lines...) Expand all Loading... |
| 24 namespace webkit_blob { | 24 namespace webkit_blob { |
| 25 | 25 |
| 26 // A request job that handles reading blob URLs. | 26 // A request job that handles reading blob URLs. |
| 27 class BlobURLRequestJob : public net::URLRequestJob { | 27 class BlobURLRequestJob : public net::URLRequestJob { |
| 28 public: | 28 public: |
| 29 BlobURLRequestJob(net::URLRequest* request, | 29 BlobURLRequestJob(net::URLRequest* request, |
| 30 BlobData* blob_data, | 30 BlobData* blob_data, |
| 31 base::MessageLoopProxy* resolving_message_loop_proxy); | 31 base::MessageLoopProxy* resolving_message_loop_proxy); |
| 32 virtual ~BlobURLRequestJob(); | 32 virtual ~BlobURLRequestJob(); |
| 33 | 33 |
| 34 // URLRequestJob methods. | 34 // net::URLRequestJob methods. |
| 35 virtual void Start(); | 35 virtual void Start(); |
| 36 virtual void Kill(); | 36 virtual void Kill(); |
| 37 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); | 37 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); |
| 38 virtual bool GetMimeType(std::string* mime_type) const; | 38 virtual bool GetMimeType(std::string* mime_type) const; |
| 39 virtual void GetResponseInfo(net::HttpResponseInfo* info); | 39 virtual void GetResponseInfo(net::HttpResponseInfo* info); |
| 40 virtual int GetResponseCode() const; | 40 virtual int GetResponseCode() const; |
| 41 virtual void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers); | 41 virtual void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 void ResolveFile(const FilePath& file_path); | 44 void ResolveFile(const FilePath& file_path); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 net::HttpByteRange byte_range_; | 80 net::HttpByteRange byte_range_; |
| 81 scoped_ptr<net::HttpResponseInfo> response_info_; | 81 scoped_ptr<net::HttpResponseInfo> response_info_; |
| 82 ScopedRunnableMethodFactory<BlobURLRequestJob> method_factory_; | 82 ScopedRunnableMethodFactory<BlobURLRequestJob> method_factory_; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); | 84 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace webkit_blob | 87 } // namespace webkit_blob |
| 88 | 88 |
| 89 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 89 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| OLD | NEW |