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 CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // the local file system snapshot, it is not added to |results|. Instead, | 197 // the local file system snapshot, it is not added to |results|. Instead, |
198 // CheckForUpdates is called. Runs |callback| with |results| if | 198 // CheckForUpdates is called. Runs |callback| with |results| if |
199 // |should_run_callback| is true. | 199 // |should_run_callback| is true. |
200 void AddToSearchResults(std::vector<SearchResultInfo>* results, | 200 void AddToSearchResults(std::vector<SearchResultInfo>* results, |
201 bool should_run_callback, | 201 bool should_run_callback, |
202 const base::Closure& callback, | 202 const base::Closure& callback, |
203 FileError error, | 203 FileError error, |
204 const base::FilePath& drive_file_path, | 204 const base::FilePath& drive_file_path, |
205 scoped_ptr<DriveEntryProto> entry_proto); | 205 scoped_ptr<DriveEntryProto> entry_proto); |
206 | 206 |
| 207 // Part of CreateDirectory(). Called after ChangeListLoader::LoadIfNeeded() |
| 208 // is called and made sure that the resource metadata is loaded. |
| 209 void CreateDirectoryAfterLoad(const base::FilePath& directory_path, |
| 210 bool is_exclusive, |
| 211 bool is_recursive, |
| 212 const FileOperationCallback& callback, |
| 213 FileError load_error); |
| 214 |
207 // Invoked during the process of CreateFile. | 215 // Invoked during the process of CreateFile. |
208 // First, FindEntryByPathAsync is called and the result is returned | 216 // First, FindEntryByPathAsync is called and the result is returned |
209 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals | 217 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals |
210 // with the cases when an entry already existed at the path. If there was no | 218 // with the cases when an entry already existed at the path. If there was no |
211 // entry, a new empty file is uploaded, and when it finishes | 219 // entry, a new empty file is uploaded, and when it finishes |
212 // DidUploadForCreateBrandNewFile does the final clean up. | 220 // DidUploadForCreateBrandNewFile does the final clean up. |
213 // |callback| must not be null. | 221 // |callback| must not be null. |
214 void OnGetEntryInfoForCreateFile(const base::FilePath& file_path, | 222 void OnGetEntryInfoForCreateFile(const base::FilePath& file_path, |
215 bool is_exclusive, | 223 bool is_exclusive, |
216 const FileOperationCallback& callback, | 224 const FileOperationCallback& callback, |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 // Note: This should remain the last member so it'll be destroyed and | 507 // Note: This should remain the last member so it'll be destroyed and |
500 // invalidate the weak pointers before any other members are destroyed. | 508 // invalidate the weak pointers before any other members are destroyed. |
501 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; | 509 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; |
502 | 510 |
503 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); | 511 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); |
504 }; | 512 }; |
505 | 513 |
506 } // namespace drive | 514 } // namespace drive |
507 | 515 |
508 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 516 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
OLD | NEW |