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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 bool exclusive, | 91 bool exclusive, |
92 bool recursive, | 92 bool recursive, |
93 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 93 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
94 virtual void DeleteEntry( | 94 virtual void DeleteEntry( |
95 const base::FilePath& entry_path, | 95 const base::FilePath& entry_path, |
96 bool recursive, | 96 bool recursive, |
97 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 97 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
98 virtual void CreateFile( | 98 virtual void CreateFile( |
99 const base::FilePath& file_path, | 99 const base::FilePath& file_path, |
100 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 100 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| 101 virtual void CopyEntry( |
| 102 const base::FilePath& source_path, |
| 103 const base::FilePath& target_path, |
| 104 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
101 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; | 105 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; |
102 virtual RequestManager* GetRequestManager() OVERRIDE; | 106 virtual RequestManager* GetRequestManager() OVERRIDE; |
103 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; | 107 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; |
104 | 108 |
105 // Factory callback, to be used in Service::SetFileSystemFactory(). The | 109 // Factory callback, to be used in Service::SetFileSystemFactory(). The |
106 // |event_router| argument can be NULL. | 110 // |event_router| argument can be NULL. |
107 static ProvidedFileSystemInterface* Create( | 111 static ProvidedFileSystemInterface* Create( |
108 Profile* profile, | 112 Profile* profile, |
109 const ProvidedFileSystemInfo& file_system_info); | 113 const ProvidedFileSystemInfo& file_system_info); |
110 | 114 |
111 private: | 115 private: |
112 typedef std::map<base::FilePath, FakeEntry> Entries; | 116 typedef std::map<base::FilePath, FakeEntry> Entries; |
113 typedef std::map<int, base::FilePath> OpenedFilesMap; | 117 typedef std::map<int, base::FilePath> OpenedFilesMap; |
114 | 118 |
115 ProvidedFileSystemInfo file_system_info_; | 119 ProvidedFileSystemInfo file_system_info_; |
116 Entries entries_; | 120 Entries entries_; |
117 OpenedFilesMap opened_files_; | 121 OpenedFilesMap opened_files_; |
118 int last_file_handle_; | 122 int last_file_handle_; |
119 | 123 |
120 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; | 124 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; |
121 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); | 125 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |
122 }; | 126 }; |
123 | 127 |
124 } // namespace file_system_provider | 128 } // namespace file_system_provider |
125 } // namespace chromeos | 129 } // namespace chromeos |
126 | 130 |
127 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ | 131 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ |
OLD | NEW |