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

Side by Side Diff: net/base/directory_lister.h

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: remove dcheck Created 3 years, 6 months 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
« no previous file with comments | « ios/web_view/internal/web_view_network_delegate.cc ('k') | net/base/directory_lister.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 NET_BASE_DIRECTORY_LISTER_H_ 5 #ifndef NET_BASE_DIRECTORY_LISTER_H_
6 #define NET_BASE_DIRECTORY_LISTER_H_ 6 #define NET_BASE_DIRECTORY_LISTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 // directory on the filesystem. It runs a task on a background thread, and 25 // directory on the filesystem. It runs a task on a background thread, and
26 // enumerates all files in the specified directory on that thread. Destroying 26 // enumerates all files in the specified directory on that thread. Destroying
27 // the lister cancels the list operation. The DirectoryLister must only be 27 // the lister cancels the list operation. The DirectoryLister must only be
28 // used on a thread with a MessageLoop. 28 // used on a thread with a MessageLoop.
29 class NET_EXPORT DirectoryLister { 29 class NET_EXPORT DirectoryLister {
30 public: 30 public:
31 // Represents one file found. 31 // Represents one file found.
32 struct DirectoryListerData { 32 struct DirectoryListerData {
33 base::FileEnumerator::FileInfo info; 33 base::FileEnumerator::FileInfo info;
34 base::FilePath path; 34 base::FilePath path;
35 base::FilePath absolute_path;
35 }; 36 };
36 37
37 // Implement this class to receive directory entries. 38 // Implement this class to receive directory entries.
38 class DirectoryListerDelegate { 39 class DirectoryListerDelegate {
39 public: 40 public:
40 // Called for each file found by the lister. 41 // Called for each file found by the lister.
41 virtual void OnListFile(const DirectoryListerData& data) = 0; 42 virtual void OnListFile(const DirectoryListerData& data) = 0;
42 43
43 // Called when the listing is complete. 44 // Called when the listing is complete.
44 virtual void OnListDone(int error) = 0; 45 virtual void OnListDone(int error) = 0;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 131
131 scoped_refptr<Core> core_; 132 scoped_refptr<Core> core_;
132 DirectoryListerDelegate* const delegate_; 133 DirectoryListerDelegate* const delegate_;
133 134
134 DISALLOW_COPY_AND_ASSIGN(DirectoryLister); 135 DISALLOW_COPY_AND_ASSIGN(DirectoryLister);
135 }; 136 };
136 137
137 } // namespace net 138 } // namespace net
138 139
139 #endif // NET_BASE_DIRECTORY_LISTER_H_ 140 #endif // NET_BASE_DIRECTORY_LISTER_H_
OLDNEW
« no previous file with comments | « ios/web_view/internal/web_view_network_delegate.cc ('k') | net/base/directory_lister.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698