| OLD | NEW |
| 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 #ifndef WEBKIT_BROWSER_BLOB_LOCAL_FILE_STREAM_READER_H_ | 5 #ifndef WEBKIT_BROWSER_BLOB_LOCAL_FILE_STREAM_READER_H_ |
| 6 #define WEBKIT_BROWSER_BLOB_LOCAL_FILE_STREAM_READER_H_ | 6 #define WEBKIT_BROWSER_BLOB_LOCAL_FILE_STREAM_READER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void DidSeekFileStream(const net::CompletionCallback& callback, | 55 void DidSeekFileStream(const net::CompletionCallback& callback, |
| 56 int64 seek_result); | 56 int64 seek_result); |
| 57 void DidOpenForRead(net::IOBuffer* buf, | 57 void DidOpenForRead(net::IOBuffer* buf, |
| 58 int buf_len, | 58 int buf_len, |
| 59 const net::CompletionCallback& callback, | 59 const net::CompletionCallback& callback, |
| 60 int open_result); | 60 int open_result); |
| 61 | 61 |
| 62 void DidGetFileInfoForGetLength(const net::Int64CompletionCallback& callback, | 62 void DidGetFileInfoForGetLength(const net::Int64CompletionCallback& callback, |
| 63 base::PlatformFileError error, | 63 base::PlatformFileError error, |
| 64 const base::PlatformFileInfo& file_info); | 64 const base::PlatformFileInfo& file_info); |
| 65 #if defined(OS_ANDROID) |
| 66 // Callback when the length of the content url is retrieved. If the content |
| 67 // url cannot be found, |result| < 0. Otherwise, |result| is be the actual |
| 68 // file size. |
| 69 void DidGetContentUrlLength(const net::Int64CompletionCallback& callback, |
| 70 int64 result); |
| 71 #endif |
| 65 | 72 |
| 66 scoped_refptr<base::TaskRunner> task_runner_; | 73 scoped_refptr<base::TaskRunner> task_runner_; |
| 67 scoped_ptr<net::FileStream> stream_impl_; | 74 scoped_ptr<net::FileStream> stream_impl_; |
| 68 const base::FilePath file_path_; | 75 const base::FilePath file_path_; |
| 69 const int64 initial_offset_; | 76 const int64 initial_offset_; |
| 70 const base::Time expected_modification_time_; | 77 const base::Time expected_modification_time_; |
| 71 bool has_pending_open_; | 78 bool has_pending_open_; |
| 72 base::WeakPtrFactory<LocalFileStreamReader> weak_factory_; | 79 base::WeakPtrFactory<LocalFileStreamReader> weak_factory_; |
| 73 }; | 80 }; |
| 74 | 81 |
| 75 } // namespace webkit_blob | 82 } // namespace webkit_blob |
| 76 | 83 |
| 77 #endif // WEBKIT_BROWSER_BLOB_LOCAL_FILE_STREAM_READER_H_ | 84 #endif // WEBKIT_BROWSER_BLOB_LOCAL_FILE_STREAM_READER_H_ |
| OLD | NEW |