| 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_FILE_SYSTEM_PROXY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_PROXY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_PROXY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_PROXY_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/chromeos/drive/file_errors.h" | 8 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 9 #include "webkit/fileapi/remote_file_system_proxy.h" | 9 #include "webkit/fileapi/remote_file_system_proxy.h" |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 // Checks if a given |url| belongs to this file system. If it does, | 96 // Checks if a given |url| belongs to this file system. If it does, |
| 97 // the call will return true and fill in |file_path| with a file path of | 97 // the call will return true and fill in |file_path| with a file path of |
| 98 // a corresponding element within this file system. | 98 // a corresponding element within this file system. |
| 99 static bool ValidateUrl(const fileapi::FileSystemURL& url, | 99 static bool ValidateUrl(const fileapi::FileSystemURL& url, |
| 100 base::FilePath* file_path); | 100 base::FilePath* file_path); |
| 101 | 101 |
| 102 // Helper method to call methods of DriveFilesSystem. This method aborts | 102 // Helper method to call methods of DriveFilesSystem. This method aborts |
| 103 // method calls in case DetachFromFileSystem() has been called. | 103 // method calls in case DetachFromFileSystem() has been called. |
| 104 void CallDriveFileSystemMethodOnUIThread(const base::Closure& method_call); | 104 void CallFileSystemMethodOnUIThread(const base::Closure& method_call); |
| 105 | 105 |
| 106 // Used to implement CallDriveFileSystemMethodOnUIThread. | 106 // Used to implement CallFileSystemMethodOnUIThread. |
| 107 void CallDriveFileSystemMethodOnUIThreadInternal( | 107 void CallFileSystemMethodOnUIThreadInternal( |
| 108 const base::Closure& method_call); | 108 const base::Closure& method_call); |
| 109 | 109 |
| 110 // Helper callback for relaying reply for status callbacks to the | 110 // Helper callback for relaying reply for status callbacks to the |
| 111 // calling thread. | 111 // calling thread. |
| 112 void OnStatusCallback( | 112 void OnStatusCallback( |
| 113 const fileapi::FileSystemOperation::StatusCallback& callback, | 113 const fileapi::FileSystemOperation::StatusCallback& callback, |
| 114 FileError error); | 114 FileError error); |
| 115 | 115 |
| 116 // Helper callback for relaying reply for metadata retrieval request to the | 116 // Helper callback for relaying reply for metadata retrieval request to the |
| 117 // calling thread. | 117 // calling thread. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 const OpenFileCallback& callback, | 197 const OpenFileCallback& callback, |
| 198 base::PlatformFile* platform_file, | 198 base::PlatformFile* platform_file, |
| 199 base::PlatformFileError* truncate_result); | 199 base::PlatformFileError* truncate_result); |
| 200 | 200 |
| 201 DriveFileSystemInterface* file_system_; | 201 DriveFileSystemInterface* file_system_; |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 } // namespace chromeos | 204 } // namespace chromeos |
| 205 | 205 |
| 206 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_PROXY_H_ | 206 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_PROXY_H_ |
| OLD | NEW |