Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: chrome/browser/chromeos/drive/mock_drive_file_system.h

Issue 14755002: drive: Drop "Drive" from FakeDriveFileSystem and MockDriveFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some more cleanup Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_DRIVE_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_DRIVE_FILE_SYSTEM_H_
7
8 #include <string>
9
10 #include "chrome/browser/chromeos/drive/drive_file_system_interface.h"
11 #include "testing/gmock/include/gmock/gmock.h"
12
13 namespace drive {
14
15 class FileSystemObserver;
16
17 // Mock for DriveFileSystemInterface.
18 class MockDriveFileSystem : public DriveFileSystemInterface {
19 public:
20 MockDriveFileSystem();
21 virtual ~MockDriveFileSystem();
22
23 // DriveFileSystemInterface overrides.
24 MOCK_METHOD0(Initialize, void());
25 MOCK_METHOD1(AddObserver, void(FileSystemObserver* observer));
26 MOCK_METHOD1(RemoveObserver,
27 void(FileSystemObserver* observer));
28 MOCK_METHOD0(CheckForUpdates, void());
29 MOCK_METHOD2(GetEntryInfoByResourceId,
30 void(const std::string& resource_id,
31 const GetEntryInfoWithFilePathCallback& callback));
32 MOCK_METHOD3(Search, void(const std::string& search_query,
33 const GURL& next_feed,
34 const SearchCallback& callback));
35 MOCK_METHOD4(SearchMetadata, void(const std::string& query,
36 int options,
37 int at_most_num_matches,
38 const SearchMetadataCallback& callback));
39 MOCK_METHOD3(TransferFileFromRemoteToLocal,
40 void(const base::FilePath& local_src_file_path,
41 const base::FilePath& remote_dest_file_path,
42 const FileOperationCallback& callback));
43 MOCK_METHOD3(TransferFileFromLocalToRemote,
44 void(const base::FilePath& local_src_file_path,
45 const base::FilePath& remote_dest_file_path,
46 const FileOperationCallback& callback));
47 MOCK_METHOD2(OpenFile, void(const base::FilePath& file_path,
48 const OpenFileCallback& callback));
49 MOCK_METHOD2(CloseFile, void(const base::FilePath& file_path,
50 const FileOperationCallback& callback));
51 MOCK_METHOD3(Copy, void(const base::FilePath& src_file_path,
52 const base::FilePath& dest_file_path,
53 const FileOperationCallback& callback));
54 MOCK_METHOD3(Move, void(const base::FilePath& src_file_path,
55 const base::FilePath& dest_file_path,
56 const FileOperationCallback& callback));
57 MOCK_METHOD3(Remove, void(const base::FilePath& file_path,
58 bool is_recursive,
59 const FileOperationCallback& callback));
60 MOCK_METHOD4(CreateDirectory,
61 void(const base::FilePath& directory_path,
62 bool is_exclusive,
63 bool is_recursive,
64 const FileOperationCallback& callback));
65 MOCK_METHOD3(CreateFile,
66 void(const base::FilePath& file_path,
67 bool is_exclusive,
68 const FileOperationCallback& callback));
69 MOCK_METHOD2(Pin, void(const base::FilePath& file_path,
70 const FileOperationCallback& callback));
71 MOCK_METHOD2(Unpin, void(const base::FilePath& file_path,
72 const FileOperationCallback& callback));
73 MOCK_METHOD2(GetFileByPath,
74 void(const base::FilePath& file_path,
75 const GetFileCallback& callback));
76 MOCK_METHOD4(
77 GetFileByResourceId,
78 void(const std::string& resource_id,
79 const DriveClientContext& context,
80 const GetFileCallback& get_file_callback,
81 const google_apis::GetContentCallback& get_content_callback));
82 MOCK_METHOD4(
83 GetFileContentByPath,
84 void(const base::FilePath& file_path,
85 const GetFileContentInitializedCallback& initialized_callback,
86 const google_apis::GetContentCallback& get_content_callback,
87 const FileOperationCallback& completion_callback));
88 MOCK_METHOD3(UpdateFileByResourceId,
89 void(const std::string& resource_id,
90 const DriveClientContext& context,
91 const FileOperationCallback& callback));
92 MOCK_METHOD2(GetEntryInfoByPath, void(const base::FilePath& file_path,
93 const GetEntryInfoCallback& callback));
94 MOCK_METHOD2(ReadDirectoryByPath,
95 void(const base::FilePath& file_path,
96 const ReadDirectoryWithSettingCallback& callback));
97 MOCK_METHOD2(RefreshDirectory,
98 void(const base::FilePath& file_path,
99 const FileOperationCallback& callback));
100 MOCK_METHOD1(GetAvailableSpace,
101 void(const GetAvailableSpaceCallback& callback));
102 // This function is not mockable by gmock because scoped_ptr is not supported.
103 virtual void AddUploadedFile(scoped_ptr<google_apis::ResourceEntry> entry,
104 const base::FilePath& file_content_path,
105 const FileOperationCallback& callback) OVERRIDE {
106 }
107 MOCK_METHOD1(GetMetadata,
108 void(const GetFilesystemMetadataCallback& callback));
109 MOCK_METHOD2(MarkCacheFileAsMounted,
110 void(const base::FilePath& drive_file_path,
111 const OpenFileCallback& callback));
112 MOCK_METHOD2(MarkCacheFileAsUnmounted,
113 void(const base::FilePath& cache_file_path,
114 const FileOperationCallback& callback));
115 MOCK_METHOD3(GetCacheEntryByResourceId,
116 void(const std::string& resource_id,
117 const std::string& md5,
118 const GetCacheEntryCallback& callback));
119 MOCK_METHOD2(IterateCache,
120 void(const CacheIterateCallback& iteration_callback,
121 const base::Closure& completion_callback));
122 MOCK_METHOD0(Reload, void());
123 };
124
125 } // namespace drive
126
127 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_MOCK_DRIVE_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_write_helper_unittest.cc ('k') | chrome/browser/chromeos/drive/mock_drive_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698