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

Side by Side Diff: webkit/browser/fileapi/recursive_operation_delegate.h

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_RECURSIVE_OPERATION_DELEGATE_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_RECURSIVE_OPERATION_DELEGATE_H_
6 #define WEBKIT_BROWSER_FILEAPI_RECURSIVE_OPERATION_DELEGATE_H_ 6 #define WEBKIT_BROWSER_FILEAPI_RECURSIVE_OPERATION_DELEGATE_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <stack> 9 #include <stack>
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 FileSystemOperationRunner* operation_runner(); 116 FileSystemOperationRunner* operation_runner();
117 117
118 // Called when Cancel() is called. This is a hook to do something more 118 // Called when Cancel() is called. This is a hook to do something more
119 // in a derived class. By default, do nothing. 119 // in a derived class. By default, do nothing.
120 virtual void OnCancel(); 120 virtual void OnCancel();
121 121
122 private: 122 private:
123 void DidTryProcessFile(const FileSystemURL& root, 123 void DidTryProcessFile(const FileSystemURL& root,
124 base::PlatformFileError error); 124 base::File::Error error);
125 void ProcessNextDirectory(); 125 void ProcessNextDirectory();
126 void DidProcessDirectory(base::PlatformFileError error); 126 void DidProcessDirectory(base::File::Error error);
127 void DidReadDirectory(const FileSystemURL& parent, 127 void DidReadDirectory(const FileSystemURL& parent,
128 base::PlatformFileError error, 128 base::File::Error error,
129 const FileEntryList& entries, 129 const FileEntryList& entries,
130 bool has_more); 130 bool has_more);
131 void ProcessPendingFiles(); 131 void ProcessPendingFiles();
132 void DidProcessFile(base::PlatformFileError error); 132 void DidProcessFile(base::File::Error error);
133 void ProcessSubDirectory(); 133 void ProcessSubDirectory();
134 void DidPostProcessDirectory(base::PlatformFileError error); 134 void DidPostProcessDirectory(base::File::Error error);
135 135
136 // Called when all recursive operation is done (or an error occurs). 136 // Called when all recursive operation is done (or an error occurs).
137 void Done(base::PlatformFileError error); 137 void Done(base::File::Error error);
138 138
139 FileSystemContext* file_system_context_; 139 FileSystemContext* file_system_context_;
140 StatusCallback callback_; 140 StatusCallback callback_;
141 std::stack<FileSystemURL> pending_directories_; 141 std::stack<FileSystemURL> pending_directories_;
142 std::stack<std::queue<FileSystemURL> > pending_directory_stack_; 142 std::stack<std::queue<FileSystemURL> > pending_directory_stack_;
143 std::queue<FileSystemURL> pending_files_; 143 std::queue<FileSystemURL> pending_files_;
144 int inflight_operations_; 144 int inflight_operations_;
145 bool canceled_; 145 bool canceled_;
146 146
147 DISALLOW_COPY_AND_ASSIGN(RecursiveOperationDelegate); 147 DISALLOW_COPY_AND_ASSIGN(RecursiveOperationDelegate);
148 }; 148 };
149 149
150 } // namespace fileapi 150 } // namespace fileapi
151 151
152 #endif // WEBKIT_BROWSER_FILEAPI_RECURSIVE_OPERATION_DELEGATE_H_ 152 #endif // WEBKIT_BROWSER_FILEAPI_RECURSIVE_OPERATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698