OLD | NEW |
1 // Copyright (c) 2011 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_callback_factory.h" | |
12 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop_proxy.h" | 13 #include "base/message_loop_proxy.h" |
14 #include "base/platform_file.h" | 14 #include "base/platform_file.h" |
15 #include "base/task.h" | 15 #include "base/task.h" |
16 #include "net/http/http_byte_range.h" | 16 #include "net/http/http_byte_range.h" |
17 #include "net/url_request/url_request_job.h" | 17 #include "net/url_request/url_request_job.h" |
18 | 18 |
19 class GURL; | 19 class GURL; |
20 class FilePath; | 20 class FilePath; |
21 | 21 |
22 namespace net { | 22 namespace net { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void DidGetMetadata(const base::PlatformFileInfo& file_info, | 55 void DidGetMetadata(const base::PlatformFileInfo& file_info, |
56 const FilePath& platform_path); | 56 const FilePath& platform_path); |
57 void DidOpen(base::PlatformFileError error_code, | 57 void DidOpen(base::PlatformFileError error_code, |
58 base::PassPlatformFile file, bool created); | 58 base::PassPlatformFile file, bool created); |
59 void DidRead(int result); | 59 void DidRead(int result); |
60 void NotifyFailed(int rv); | 60 void NotifyFailed(int rv); |
61 | 61 |
62 FileSystemContext* file_system_context_; | 62 FileSystemContext* file_system_context_; |
63 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; | 63 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; |
64 ScopedRunnableMethodFactory<FileSystemURLRequestJob> method_factory_; | 64 ScopedRunnableMethodFactory<FileSystemURLRequestJob> method_factory_; |
65 base::ScopedCallbackFactory<FileSystemURLRequestJob> callback_factory_; | 65 base::WeakPtrFactory<FileSystemURLRequestJob> weak_factory_; |
66 scoped_ptr<net::FileStream> stream_; | 66 scoped_ptr<net::FileStream> stream_; |
67 bool is_directory_; | 67 bool is_directory_; |
68 scoped_ptr<net::HttpResponseInfo> response_info_; | 68 scoped_ptr<net::HttpResponseInfo> response_info_; |
69 int64 remaining_bytes_; | 69 int64 remaining_bytes_; |
70 net::HttpByteRange byte_range_; | 70 net::HttpByteRange byte_range_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); | 72 DISALLOW_COPY_AND_ASSIGN(FileSystemURLRequestJob); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace fileapi | 75 } // namespace fileapi |
76 | 76 |
77 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ | 77 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_REQUEST_JOB_H_ |
OLD | NEW |