| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_FAKE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FAKE_FILE_SYSTEM_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FAKE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FAKE_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/chromeos/drive/file_errors.h" | 14 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 15 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 15 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
| 16 #include "google_apis/drive/drive_api_error_codes.h" | 16 #include "google_apis/drive/drive_api_error_codes.h" |
| 17 | 17 |
| 18 namespace google_apis { | 18 namespace google_apis { |
| 19 | 19 |
| 20 class AboutResource; | 20 class AboutResource; |
| 21 class FileResource; | 21 class FileResource; |
| 22 | 22 |
| 23 } // namespace google_apis | 23 } // namespace google_apis |
| 24 | 24 |
| 25 namespace user_manager { |
| 26 class UserID; |
| 27 } |
| 28 |
| 25 namespace drive { | 29 namespace drive { |
| 26 | 30 |
| 27 class DriveServiceInterface; | 31 class DriveServiceInterface; |
| 28 class FileSystemObserver; | 32 class FileSystemObserver; |
| 29 class ResourceEntry; | 33 class ResourceEntry; |
| 30 | 34 |
| 31 namespace test_util { | 35 namespace test_util { |
| 32 | 36 |
| 33 // This class implements a fake FileSystem which acts like a real Drive | 37 // This class implements a fake FileSystem which acts like a real Drive |
| 34 // file system with FakeDriveService, for testing purpose. | 38 // file system with FakeDriveService, for testing purpose. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void GetAvailableSpace(const GetAvailableSpaceCallback& callback) override; | 112 void GetAvailableSpace(const GetAvailableSpaceCallback& callback) override; |
| 109 void GetShareUrl(const base::FilePath& file_path, | 113 void GetShareUrl(const base::FilePath& file_path, |
| 110 const GURL& embed_origin, | 114 const GURL& embed_origin, |
| 111 const GetShareUrlCallback& callback) override; | 115 const GetShareUrlCallback& callback) override; |
| 112 void GetMetadata(const GetFilesystemMetadataCallback& callback) override; | 116 void GetMetadata(const GetFilesystemMetadataCallback& callback) override; |
| 113 void MarkCacheFileAsMounted(const base::FilePath& drive_file_path, | 117 void MarkCacheFileAsMounted(const base::FilePath& drive_file_path, |
| 114 const MarkMountedCallback& callback) override; | 118 const MarkMountedCallback& callback) override; |
| 115 void MarkCacheFileAsUnmounted(const base::FilePath& cache_file_path, | 119 void MarkCacheFileAsUnmounted(const base::FilePath& cache_file_path, |
| 116 const FileOperationCallback& callback) override; | 120 const FileOperationCallback& callback) override; |
| 117 void AddPermission(const base::FilePath& drive_file_path, | 121 void AddPermission(const base::FilePath& drive_file_path, |
| 118 const std::string& email, | 122 const user_manager::UserID& email, |
| 119 google_apis::drive::PermissionRole role, | 123 google_apis::drive::PermissionRole role, |
| 120 const FileOperationCallback& callback) override; | 124 const FileOperationCallback& callback) override; |
| 121 void SetProperty(const base::FilePath& drive_file_path, | 125 void SetProperty(const base::FilePath& drive_file_path, |
| 122 google_apis::drive::Property::Visibility visibility, | 126 google_apis::drive::Property::Visibility visibility, |
| 123 const std::string& key, | 127 const std::string& key, |
| 124 const std::string& value, | 128 const std::string& value, |
| 125 const FileOperationCallback& callback) override; | 129 const FileOperationCallback& callback) override; |
| 126 void Reset(const FileOperationCallback& callback) override; | 130 void Reset(const FileOperationCallback& callback) override; |
| 127 void GetPathFromResourceId(const std::string& resource_id, | 131 void GetPathFromResourceId(const std::string& resource_id, |
| 128 const GetFilePathCallback& callback) override; | 132 const GetFilePathCallback& callback) override; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // invalidate the weak pointers before any other members are destroyed. | 190 // invalidate the weak pointers before any other members are destroyed. |
| 187 base::WeakPtrFactory<FakeFileSystem> weak_ptr_factory_; | 191 base::WeakPtrFactory<FakeFileSystem> weak_ptr_factory_; |
| 188 | 192 |
| 189 DISALLOW_COPY_AND_ASSIGN(FakeFileSystem); | 193 DISALLOW_COPY_AND_ASSIGN(FakeFileSystem); |
| 190 }; | 194 }; |
| 191 | 195 |
| 192 } // namespace test_util | 196 } // namespace test_util |
| 193 } // namespace drive | 197 } // namespace drive |
| 194 | 198 |
| 195 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FAKE_FILE_SYSTEM_H_ | 199 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FAKE_FILE_SYSTEM_H_ |
| OLD | NEW |