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_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/files/file.h" |
11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop/message_loop_proxy.h" | 14 #include "base/message_loop/message_loop_proxy.h" |
14 #include "base/platform_file.h" | |
15 #include "net/url_request/url_request_job.h" | 15 #include "net/url_request/url_request_job.h" |
16 #include "webkit/browser/fileapi/file_system_url.h" | 16 #include "webkit/browser/fileapi/file_system_url.h" |
17 #include "webkit/browser/webkit_storage_browser_export.h" | 17 #include "webkit/browser/webkit_storage_browser_export.h" |
18 | 18 |
19 namespace fileapi { | 19 namespace fileapi { |
20 | 20 |
21 class FileSystemContext; | 21 class FileSystemContext; |
22 struct DirectoryEntry; | 22 struct DirectoryEntry; |
23 | 23 |
24 // A request job that handles reading filesystem: URLs for directories. | 24 // A request job that handles reading filesystem: URLs for directories. |
(...skipping 17 matching lines...) Expand all Loading... |
42 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 42 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
43 // TODO(adamk): Implement GetResponseInfo and GetResponseCode to simulate | 43 // TODO(adamk): Implement GetResponseInfo and GetResponseCode to simulate |
44 // an HTTP response. | 44 // an HTTP response. |
45 | 45 |
46 private: | 46 private: |
47 class CallbackDispatcher; | 47 class CallbackDispatcher; |
48 | 48 |
49 virtual ~FileSystemDirURLRequestJob(); | 49 virtual ~FileSystemDirURLRequestJob(); |
50 | 50 |
51 void StartAsync(); | 51 void StartAsync(); |
52 void DidReadDirectory(base::PlatformFileError result, | 52 void DidReadDirectory(base::File::Error result, |
53 const std::vector<DirectoryEntry>& entries, | 53 const std::vector<DirectoryEntry>& entries, |
54 bool has_more); | 54 bool has_more); |
55 | 55 |
56 std::string data_; | 56 std::string data_; |
57 FileSystemURL url_; | 57 FileSystemURL url_; |
58 FileSystemContext* file_system_context_; | 58 FileSystemContext* file_system_context_; |
59 base::WeakPtrFactory<FileSystemDirURLRequestJob> weak_factory_; | 59 base::WeakPtrFactory<FileSystemDirURLRequestJob> weak_factory_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(FileSystemDirURLRequestJob); | 61 DISALLOW_COPY_AND_ASSIGN(FileSystemDirURLRequestJob); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace fileapi | 64 } // namespace fileapi |
65 | 65 |
66 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ | 66 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ |
OLD | NEW |