Chromium Code Reviews| Index: chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h |
| diff --git a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h |
| index f9dd955fa9e6b3aafefbd450a6ca0136ea218395..28a5f6b06742b7e1d49cd8cf455f687ab6d5e55e 100644 |
| --- a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h |
| +++ b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h |
| @@ -12,9 +12,11 @@ |
| #include "base/callback.h" |
| #include "base/memory/linked_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "base/observer_list.h" |
| #include "base/task/cancelable_task_tracker.h" |
| #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info.h" |
| #include "chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h" |
| +#include "chrome/browser/chromeos/file_system_provider/provided_file_system_observer.h" |
| class Profile; |
| @@ -122,8 +124,23 @@ class FakeProvidedFileSystem : public ProvidedFileSystemInterface { |
| int64 offset, |
| int length, |
| const storage::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| + virtual AbortCallback ObserveDirectory( |
|
mtomasz
2014/10/03 04:22:47
Currently we support observing directories only, n
|
| + const base::FilePath& directory_path, |
| + bool recursive, |
| + const storage::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| + virtual AbortCallback UnobserveEntry( |
|
mtomasz
2014/10/03 04:22:47
Method for unobserving files would have the same s
|
| + const base::FilePath& entry_path, |
| + const storage::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; |
| virtual RequestManager* GetRequestManager() OVERRIDE; |
| + virtual ObservedEntries* GetObservedEntries() OVERRIDE; |
| + virtual void AddObserver(ProvidedFileSystemObserver* observer) OVERRIDE; |
|
mtomasz
2014/10/03 04:22:47
Cache implementation will add itself as an observe
|
| + virtual void RemoveObserver(ProvidedFileSystemObserver* observer) OVERRIDE; |
| + virtual bool Notify( |
|
mtomasz
2014/10/03 04:22:47
This is called from file_system_provider_api.cc, s
|
| + const base::FilePath& observed_path, |
| + ProvidedFileSystemObserver::ChangeType change_type, |
| + const ProvidedFileSystemObserver::ChildChanges& child_changes, |
| + const std::string& tag) OVERRIDE; |
| virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; |
| // Factory callback, to be used in Service::SetFileSystemFactory(). The |
| @@ -156,6 +173,7 @@ class FakeProvidedFileSystem : public ProvidedFileSystemInterface { |
| OpenedFilesMap opened_files_; |
| int last_file_handle_; |
| base::CancelableTaskTracker tracker_; |
| + ObserverList<ProvidedFileSystemObserver> observers_; |
| base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |