Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: storage/browser/fileapi/file_system_dir_url_request_job.h

Issue 1432403003: Do not call stat() when reading directories via File API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed FSP tests. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ 5 #ifndef STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_
6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ 6 #define STORAGE_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
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class CallbackDispatcher; 45 class CallbackDispatcher;
46 46
47 ~FileSystemDirURLRequestJob() override; 47 ~FileSystemDirURLRequestJob() override;
48 48
49 void StartAsync(); 49 void StartAsync();
50 void DidAttemptAutoMount(base::File::Error result); 50 void DidAttemptAutoMount(base::File::Error result);
51 void DidReadDirectory(base::File::Error result, 51 void DidReadDirectory(base::File::Error result,
52 const std::vector<DirectoryEntry>& entries, 52 const std::vector<DirectoryEntry>& entries,
53 bool has_more); 53 bool has_more);
54 54
55 // Reads metadata for the |index|-th entry in the directory. Must be called
56 // after |entries_| is filled.
57 void GetMetadata(size_t index);
58 void DidGetMetadata(size_t index,
59 base::File::Error result,
60 const base::File::Info& file_info);
61
62 std::vector<DirectoryEntry> entries_;
55 std::string data_; 63 std::string data_;
56 FileSystemURL url_; 64 FileSystemURL url_;
57 const std::string storage_domain_; 65 const std::string storage_domain_;
58 FileSystemContext* file_system_context_; 66 FileSystemContext* file_system_context_;
59 base::WeakPtrFactory<FileSystemDirURLRequestJob> weak_factory_; 67 base::WeakPtrFactory<FileSystemDirURLRequestJob> weak_factory_;
60 68
61 DISALLOW_COPY_AND_ASSIGN(FileSystemDirURLRequestJob); 69 DISALLOW_COPY_AND_ASSIGN(FileSystemDirURLRequestJob);
62 }; 70 };
63 71
64 } // namespace storage 72 } // namespace storage
65 73
66 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_ 74 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_DIR_URL_REQUEST_JOB_H_
OLDNEW
« no previous file with comments | « storage/browser/fileapi/async_file_util_adapter.cc ('k') | storage/browser/fileapi/file_system_dir_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698