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_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ |
7 | 7 |
8 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" | 8 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" |
9 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h" | 9 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h" |
10 | 10 |
11 class Profile; | 11 class Profile; |
12 | 12 |
13 namespace gdata { | 13 namespace gdata { |
14 | 14 |
15 // The interface class for remote file system proxy. | 15 // The interface class for remote file system proxy. |
16 class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface { | 16 class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface { |
17 public: | 17 public: |
18 // |profile| is used to create GDataFileSystem, which is a per-profile | 18 // |profile| is used to create GDataFileSystem, which is a per-profile |
19 // instance. | 19 // instance. |
20 explicit GDataFileSystemProxy(Profile* profile); | 20 explicit GDataFileSystemProxy(Profile* profile); |
21 virtual ~GDataFileSystemProxy(); | 21 virtual ~GDataFileSystemProxy(); |
22 | 22 |
23 // fileapi::RemoteFileSystemProxyInterface overrides. | 23 // fileapi::RemoteFileSystemProxyInterface overrides. |
24 virtual void GetFileInfo(const GURL& path, | 24 virtual void GetFileInfo(const GURL& path, |
25 const fileapi::FileSystemOperationInterface::GetMetadataCallback& | 25 const fileapi::FileSystemOperationInterface::GetMetadataCallback& |
26 callback) OVERRIDE; | 26 callback) OVERRIDE; |
| 27 virtual void Copy(const GURL& src_path, const GURL& dest_path, |
| 28 const fileapi::FileSystemOperationInterface::StatusCallback& callback) |
| 29 OVERRIDE; |
| 30 virtual void Move(const GURL& src_path, const GURL& dest_path, |
| 31 const fileapi::FileSystemOperationInterface::StatusCallback& callback) |
| 32 OVERRIDE; |
27 virtual void ReadDirectory(const GURL& path, | 33 virtual void ReadDirectory(const GURL& path, |
28 const fileapi::FileSystemOperationInterface::ReadDirectoryCallback& | 34 const fileapi::FileSystemOperationInterface::ReadDirectoryCallback& |
29 callback) OVERRIDE; | 35 callback) OVERRIDE; |
30 virtual void Remove(const GURL& path, bool recursive, | 36 virtual void Remove(const GURL& path, bool recursive, |
31 const fileapi::FileSystemOperationInterface::StatusCallback& callback) | 37 const fileapi::FileSystemOperationInterface::StatusCallback& callback) |
32 OVERRIDE; | 38 OVERRIDE; |
33 virtual void CreateDirectory( | 39 virtual void CreateDirectory( |
34 const GURL& file_url, | 40 const GURL& file_url, |
35 bool exclusive, | 41 bool exclusive, |
36 bool recursive, | 42 bool recursive, |
(...skipping 10 matching lines...) Expand all Loading... |
47 // GDataFileSystemProxy is owned by Profile, which outlives | 53 // GDataFileSystemProxy is owned by Profile, which outlives |
48 // GDataFileSystemProxy, which is owned by CrosMountPointProvider (i.e. by | 54 // GDataFileSystemProxy, which is owned by CrosMountPointProvider (i.e. by |
49 // the time Profile is removed, the file manager is already gone). Hence | 55 // the time Profile is removed, the file manager is already gone). Hence |
50 // it's safe to use this as a raw pointer. | 56 // it's safe to use this as a raw pointer. |
51 GDataFileSystem* file_system_; | 57 GDataFileSystem* file_system_; |
52 }; | 58 }; |
53 | 59 |
54 } // namespace chromeos | 60 } // namespace chromeos |
55 | 61 |
56 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ | 62 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_ |
OLD | NEW |