| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // FilterContext methods (via URLRequestJob): | 49 // FilterContext methods (via URLRequestJob): |
| 50 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 50 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 class CallbackDispatcher; | 53 class CallbackDispatcher; |
| 54 | 54 |
| 55 virtual ~FileSystemURLRequestJob(); | 55 virtual ~FileSystemURLRequestJob(); |
| 56 | 56 |
| 57 void StartAsync(); | 57 void StartAsync(); |
| 58 void DidGetMetadata(base::PlatformFileError error_code, | 58 void DidGetMetadata(const base::PlatformFileInfo& file_info, |
| 59 const base::PlatformFileInfo& file_info, | |
| 60 const FilePath& platform_path); | 59 const FilePath& platform_path); |
| 61 void DidOpen(base::PlatformFileError error_code, | 60 void DidOpen(base::PlatformFileError error_code, |
| 62 base::PassPlatformFile file, bool created); | 61 base::PassPlatformFile file, bool created); |
| 63 void DidRead(int result); | 62 void DidRead(int result); |
| 64 void NotifyFailed(int rv); | 63 void NotifyFailed(int rv); |
| 65 | 64 |
| 66 FileSystemContext* file_system_context_; | 65 FileSystemContext* file_system_context_; |
| 67 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; | 66 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; |
| 68 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_; | 67 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_; |
| 69 scoped_ptr<net::FileStream> stream_; | 68 scoped_ptr<net::FileStream> stream_; |
| 70 bool is_directory_; | 69 bool is_directory_; |
| 71 scoped_ptr<net::HttpResponseInfo> response_info_; | 70 scoped_ptr<net::HttpResponseInfo> response_info_; |
| 72 int64 remaining_bytes_; | 71 int64 remaining_bytes_; |
| 73 net::HttpByteRange byte_range_; | 72 net::HttpByteRange byte_range_; |
| 74 | 73 |
| 75 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); | 74 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 } // namespace fileapi | 77 } // namespace fileapi |
| 79 | 78 |
| 80 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ | 79 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ |
| OLD | NEW |