| 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 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 net::IOBuffer* buffer, | 124 net::IOBuffer* buffer, |
| 125 int64 offset, | 125 int64 offset, |
| 126 int length, | 126 int length, |
| 127 const storage::AsyncFileUtil::StatusCallback& callback) override; | 127 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 128 virtual AbortCallback ObserveDirectory( | 128 virtual AbortCallback ObserveDirectory( |
| 129 const base::FilePath& directory_path, | 129 const base::FilePath& directory_path, |
| 130 bool recursive, | 130 bool recursive, |
| 131 const storage::AsyncFileUtil::StatusCallback& callback) override; | 131 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 132 virtual void UnobserveEntry( | 132 virtual void UnobserveEntry( |
| 133 const base::FilePath& entry_path, | 133 const base::FilePath& entry_path, |
| 134 bool recursive, |
| 134 const storage::AsyncFileUtil::StatusCallback& callback) override; | 135 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 135 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const override; | 136 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const override; |
| 136 virtual RequestManager* GetRequestManager() override; | 137 virtual RequestManager* GetRequestManager() override; |
| 137 virtual ObservedEntries* GetObservedEntries() override; | 138 virtual ObservedEntries* GetObservedEntries() override; |
| 138 virtual void AddObserver(ProvidedFileSystemObserver* observer) override; | 139 virtual void AddObserver(ProvidedFileSystemObserver* observer) override; |
| 139 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) override; | 140 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) override; |
| 140 virtual bool Notify( | 141 virtual bool Notify(const base::FilePath& observed_path, |
| 141 const base::FilePath& observed_path, | 142 bool recursive, |
| 142 ProvidedFileSystemObserver::ChangeType change_type, | 143 ProvidedFileSystemObserver::ChangeType change_type, |
| 143 scoped_ptr<ProvidedFileSystemObserver::ChildChanges> child_changes, | 144 scoped_ptr<ProvidedFileSystemObserver::Changes> changes, |
| 144 const std::string& tag) override; | 145 const std::string& tag) override; |
| 145 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() override; | 146 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() override; |
| 146 | 147 |
| 147 // Factory callback, to be used in Service::SetFileSystemFactory(). The | 148 // Factory callback, to be used in Service::SetFileSystemFactory(). The |
| 148 // |event_router| argument can be NULL. | 149 // |event_router| argument can be NULL. |
| 149 static ProvidedFileSystemInterface* Create( | 150 static ProvidedFileSystemInterface* Create( |
| 150 Profile* profile, | 151 Profile* profile, |
| 151 const ProvidedFileSystemInfo& file_system_info); | 152 const ProvidedFileSystemInfo& file_system_info); |
| 152 | 153 |
| 153 private: | 154 private: |
| 154 typedef std::map<base::FilePath, linked_ptr<FakeEntry> > Entries; | 155 typedef std::map<base::FilePath, linked_ptr<FakeEntry> > Entries; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 178 ObservedEntries observed_entries_; | 179 ObservedEntries observed_entries_; |
| 179 | 180 |
| 180 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; | 181 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; |
| 181 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); | 182 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace file_system_provider | 185 } // namespace file_system_provider |
| 185 } // namespace chromeos | 186 } // namespace chromeos |
| 186 | 187 |
| 187 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ | 188 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ |
| OLD | NEW |