| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_FILE_SYSTEM_PROXY_H_ | 5 #ifndef CHROME_BROWSER_FILE_SYSTEM_PROXY_H_ |
| 6 #define CHROME_BROWSER_FILE_SYSTEM_PROXY_H_ | 6 #define CHROME_BROWSER_FILE_SYSTEM_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
| 10 #include "base/ref_counted.h" | |
| 11 | 10 |
| 12 // This class provides asynchronous access to common file routines. | 11 // This class provides asynchronous access to common file routines. |
| 13 class FileSystemProxy { | 12 class FileSystemProxy { |
| 14 public: | 13 public: |
| 15 // This callback is used by methods that report success with a bool. It is | 14 // This callback is used by methods that report success with a bool. It is |
| 16 // valid to pass NULL as the callback parameter to any function that takes a | 15 // valid to pass NULL as the callback parameter to any function that takes a |
| 17 // StatusCallback, in which case the operation will complete silently. | 16 // StatusCallback, in which case the operation will complete silently. |
| 18 typedef Callback1<bool /* succeeded */>::Type StatusCallback; | 17 typedef Callback1<bool /* succeeded */>::Type StatusCallback; |
| 19 | 18 |
| 20 // Creates or opens a file with the given flags. It is invalid to pass NULL | 19 // Creates or opens a file with the given flags. It is invalid to pass NULL |
| (...skipping 19 matching lines...) Expand all Loading... |
| 40 | 39 |
| 41 // Deletes a directory and all of its contents. | 40 // Deletes a directory and all of its contents. |
| 42 static void RecursiveDelete(const FilePath& file_path, | 41 static void RecursiveDelete(const FilePath& file_path, |
| 43 StatusCallback* callback); | 42 StatusCallback* callback); |
| 44 | 43 |
| 45 private: | 44 private: |
| 46 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemProxy); | 45 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemProxy); |
| 47 }; | 46 }; |
| 48 | 47 |
| 49 #endif // CHROME_BROWSER_FILE_SYSTEM_PROXY_H_ | 48 #endif // CHROME_BROWSER_FILE_SYSTEM_PROXY_H_ |
| OLD | NEW |