| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const base::FilePath& entry_path, | 66 const base::FilePath& entry_path, |
| 67 bool recursive, | 67 bool recursive, |
| 68 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 68 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| 69 virtual void CreateFile( | 69 virtual void CreateFile( |
| 70 const base::FilePath& file_path, | 70 const base::FilePath& file_path, |
| 71 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 71 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| 72 virtual void CopyEntry( | 72 virtual void CopyEntry( |
| 73 const base::FilePath& source_path, | 73 const base::FilePath& source_path, |
| 74 const base::FilePath& target_path, | 74 const base::FilePath& target_path, |
| 75 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 75 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| 76 virtual void MoveEntry( |
| 77 const base::FilePath& source_path, |
| 78 const base::FilePath& target_path, |
| 79 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| 76 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; | 80 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; |
| 77 virtual RequestManager* GetRequestManager() OVERRIDE; | 81 virtual RequestManager* GetRequestManager() OVERRIDE; |
| 78 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; | 82 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; |
| 79 | 83 |
| 80 // Factory callback, to be used in Service::SetFileSystemFactory(). The | 84 // Factory callback, to be used in Service::SetFileSystemFactory(). The |
| 81 // |event_router| argument can be NULL. | 85 // |event_router| argument can be NULL. |
| 82 static ProvidedFileSystemInterface* Create( | 86 static ProvidedFileSystemInterface* Create( |
| 83 Profile* profile, | 87 Profile* profile, |
| 84 const ProvidedFileSystemInfo& file_system_info); | 88 const ProvidedFileSystemInfo& file_system_info); |
| 85 | 89 |
| 86 private: | 90 private: |
| 87 typedef std::map<int, base::FilePath> OpenedFilesMap; | 91 typedef std::map<int, base::FilePath> OpenedFilesMap; |
| 88 | 92 |
| 89 ProvidedFileSystemInfo file_system_info_; | 93 ProvidedFileSystemInfo file_system_info_; |
| 90 OpenedFilesMap opened_files_; | 94 OpenedFilesMap opened_files_; |
| 91 int last_file_handle_; | 95 int last_file_handle_; |
| 92 | 96 |
| 93 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; | 97 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; |
| 94 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); | 98 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |
| 95 }; | 99 }; |
| 96 | 100 |
| 97 } // namespace file_system_provider | 101 } // namespace file_system_provider |
| 98 } // namespace chromeos | 102 } // namespace chromeos |
| 99 | 103 |
| 100 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ | 104 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ |
| OLD | NEW |