• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DUMMY_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DUMMY_FILE_SYSTEM_H_
7 
8 #include "chrome/browser/chromeos/drive/file_system_interface.h"
9 
10 namespace drive {
11 
12 // Dummy implementation of FileSystemInterface. All functions do nothing.
13 class DummyFileSystem : public FileSystemInterface {
14  public:
~DummyFileSystem()15   virtual ~DummyFileSystem() {}
AddObserver(FileSystemObserver * observer)16   virtual void AddObserver(FileSystemObserver* observer) OVERRIDE {}
RemoveObserver(FileSystemObserver * observer)17   virtual void RemoveObserver(FileSystemObserver* observer) OVERRIDE {}
CheckForUpdates()18   virtual void CheckForUpdates() OVERRIDE {}
TransferFileFromLocalToRemote(const base::FilePath & local_src_file_path,const base::FilePath & remote_dest_file_path,const FileOperationCallback & callback)19   virtual void TransferFileFromLocalToRemote(
20       const base::FilePath& local_src_file_path,
21       const base::FilePath& remote_dest_file_path,
22       const FileOperationCallback& callback) OVERRIDE {}
OpenFile(const base::FilePath & file_path,OpenMode open_mode,const std::string & mime_type,const OpenFileCallback & callback)23   virtual void OpenFile(const base::FilePath& file_path,
24                         OpenMode open_mode,
25                         const std::string& mime_type,
26                         const OpenFileCallback& callback) OVERRIDE {}
Copy(const base::FilePath & src_file_path,const base::FilePath & dest_file_path,bool preserve_last_modified,const FileOperationCallback & callback)27   virtual void Copy(const base::FilePath& src_file_path,
28                     const base::FilePath& dest_file_path,
29                     bool preserve_last_modified,
30                     const FileOperationCallback& callback) OVERRIDE {}
Move(const base::FilePath & src_file_path,const base::FilePath & dest_file_path,const FileOperationCallback & callback)31   virtual void Move(const base::FilePath& src_file_path,
32                     const base::FilePath& dest_file_path,
33                     const FileOperationCallback& callback) OVERRIDE {}
Remove(const base::FilePath & file_path,bool is_recursive,const FileOperationCallback & callback)34   virtual void Remove(const base::FilePath& file_path,
35                       bool is_recursive,
36                       const FileOperationCallback& callback) OVERRIDE {}
CreateDirectory(const base::FilePath & directory_path,bool is_exclusive,bool is_recursive,const FileOperationCallback & callback)37   virtual void CreateDirectory(
38       const base::FilePath& directory_path,
39       bool is_exclusive,
40       bool is_recursive,
41       const FileOperationCallback& callback) OVERRIDE {}
CreateFile(const base::FilePath & file_path,bool is_exclusive,const std::string & mime_type,const FileOperationCallback & callback)42   virtual void CreateFile(const base::FilePath& file_path,
43                           bool is_exclusive,
44                           const std::string& mime_type,
45                           const FileOperationCallback& callback) OVERRIDE {}
TouchFile(const base::FilePath & file_path,const base::Time & last_access_time,const base::Time & last_modified_time,const FileOperationCallback & callback)46   virtual void TouchFile(const base::FilePath& file_path,
47                          const base::Time& last_access_time,
48                          const base::Time& last_modified_time,
49                          const FileOperationCallback& callback) OVERRIDE {}
TruncateFile(const base::FilePath & file_path,int64 length,const FileOperationCallback & callback)50   virtual void TruncateFile(const base::FilePath& file_path,
51                             int64 length,
52                             const FileOperationCallback& callback) OVERRIDE {}
Pin(const base::FilePath & file_path,const FileOperationCallback & callback)53   virtual void Pin(const base::FilePath& file_path,
54                    const FileOperationCallback& callback) OVERRIDE {}
Unpin(const base::FilePath & file_path,const FileOperationCallback & callback)55   virtual void Unpin(const base::FilePath& file_path,
56                      const FileOperationCallback& callback) OVERRIDE {}
GetFile(const base::FilePath & file_path,const GetFileCallback & callback)57   virtual void GetFile(const base::FilePath& file_path,
58                        const GetFileCallback& callback) OVERRIDE {}
GetFileForSaving(const base::FilePath & file_path,const GetFileCallback & callback)59   virtual void GetFileForSaving(const base::FilePath& file_path,
60                                 const GetFileCallback& callback) OVERRIDE {}
61   virtual base::Closure GetFileContent(
62       const base::FilePath& file_path,
63       const GetFileContentInitializedCallback& initialized_callback,
64       const google_apis::GetContentCallback& get_content_callback,
65       const FileOperationCallback& completion_callback) OVERRIDE;
GetResourceEntry(const base::FilePath & file_path,const GetResourceEntryCallback & callback)66   virtual void GetResourceEntry(
67       const base::FilePath& file_path,
68       const GetResourceEntryCallback& callback) OVERRIDE {}
ReadDirectory(const base::FilePath & file_path,const ReadDirectoryEntriesCallback & entries_callback,const FileOperationCallback & completion_callback)69   virtual void ReadDirectory(
70       const base::FilePath& file_path,
71       const ReadDirectoryEntriesCallback& entries_callback,
72       const FileOperationCallback& completion_callback) OVERRIDE {}
Search(const std::string & search_query,const GURL & next_link,const SearchCallback & callback)73   virtual void Search(const std::string& search_query,
74                       const GURL& next_link,
75                       const SearchCallback& callback) OVERRIDE {}
SearchMetadata(const std::string & query,int options,int at_most_num_matches,const SearchMetadataCallback & callback)76   virtual void SearchMetadata(
77       const std::string& query,
78       int options,
79       int at_most_num_matches,
80       const SearchMetadataCallback& callback) OVERRIDE {}
GetAvailableSpace(const GetAvailableSpaceCallback & callback)81   virtual void GetAvailableSpace(
82       const GetAvailableSpaceCallback& callback) OVERRIDE {}
GetShareUrl(const base::FilePath & file_path,const GURL & embed_origin,const GetShareUrlCallback & callback)83   virtual void GetShareUrl(const base::FilePath& file_path,
84                            const GURL& embed_origin,
85                            const GetShareUrlCallback& callback) OVERRIDE {}
GetMetadata(const GetFilesystemMetadataCallback & callback)86   virtual void GetMetadata(
87       const GetFilesystemMetadataCallback& callback) OVERRIDE {}
MarkCacheFileAsMounted(const base::FilePath & drive_file_path,const MarkMountedCallback & callback)88   virtual void MarkCacheFileAsMounted(
89       const base::FilePath& drive_file_path,
90       const MarkMountedCallback& callback) OVERRIDE {}
MarkCacheFileAsUnmounted(const base::FilePath & cache_file_path,const FileOperationCallback & callback)91   virtual void MarkCacheFileAsUnmounted(
92       const base::FilePath& cache_file_path,
93       const FileOperationCallback& callback) OVERRIDE {}
AddPermission(const base::FilePath & drive_file_path,const std::string & email,google_apis::drive::PermissionRole role,const FileOperationCallback & callback)94   virtual void AddPermission(const base::FilePath& drive_file_path,
95                              const std::string& email,
96                              google_apis::drive::PermissionRole role,
97                              const FileOperationCallback& callback) OVERRIDE {}
Reset(const FileOperationCallback & callback)98   virtual void Reset(const FileOperationCallback& callback) OVERRIDE {}
GetPathFromResourceId(const std::string & resource_id,const GetFilePathCallback & callback)99   virtual void GetPathFromResourceId(const std::string& resource_id,
100                                      const GetFilePathCallback& callback)
101       OVERRIDE {}
102 };
103 
104 }  // namespace drive
105 
106 #endif  // CHROME_BROWSER_CHROMEOS_DRIVE_DUMMY_FILE_SYSTEM_H_
107