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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 virtual void ReadFile(int file_handle, | 56 virtual void ReadFile(int file_handle, |
57 net::IOBuffer* buffer, | 57 net::IOBuffer* buffer, |
58 int64 offset, | 58 int64 offset, |
59 int length, | 59 int length, |
60 const ReadChunkReceivedCallback& callback) OVERRIDE; | 60 const ReadChunkReceivedCallback& callback) OVERRIDE; |
61 virtual void CreateDirectory( | 61 virtual void CreateDirectory( |
62 const base::FilePath& directory_path, | 62 const base::FilePath& directory_path, |
63 bool exclusive, | 63 bool exclusive, |
64 bool recursive, | 64 bool recursive, |
65 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 65 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| 66 virtual void DeleteEntry( |
| 67 const base::FilePath& entry_path, |
| 68 bool recursive, |
| 69 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
66 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; | 70 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; |
67 virtual RequestManager* GetRequestManager() OVERRIDE; | 71 virtual RequestManager* GetRequestManager() OVERRIDE; |
68 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; | 72 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; |
69 | 73 |
70 // Factory callback, to be used in Service::SetFileSystemFactory(). The | 74 // Factory callback, to be used in Service::SetFileSystemFactory(). The |
71 // |event_router| argument can be NULL. | 75 // |event_router| argument can be NULL. |
72 static ProvidedFileSystemInterface* Create( | 76 static ProvidedFileSystemInterface* Create( |
73 Profile* profile, | 77 Profile* profile, |
74 const ProvidedFileSystemInfo& file_system_info); | 78 const ProvidedFileSystemInfo& file_system_info); |
75 | 79 |
76 private: | 80 private: |
77 typedef std::map<int, base::FilePath> OpenedFilesMap; | 81 typedef std::map<int, base::FilePath> OpenedFilesMap; |
78 | 82 |
79 ProvidedFileSystemInfo file_system_info_; | 83 ProvidedFileSystemInfo file_system_info_; |
80 OpenedFilesMap opened_files_; | 84 OpenedFilesMap opened_files_; |
81 int last_file_handle_; | 85 int last_file_handle_; |
82 | 86 |
83 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; | 87 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; |
84 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); | 88 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |
85 }; | 89 }; |
86 | 90 |
87 } // namespace file_system_provider | 91 } // namespace file_system_provider |
88 } // namespace chromeos | 92 } // namespace chromeos |
89 | 93 |
90 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ | 94 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ |
OLD | NEW |