| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_WATCHER_MANAG
ER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_WATCHER_MANAG
ER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "storage/browser/fileapi/watcher_manager.h" |
| 11 |
| 12 namespace arc { |
| 13 |
| 14 class ArcDocumentsProviderRootMap; |
| 15 |
| 16 // The implementation of storage::WatcherManager for ARC documents provider |
| 17 // filesystem. |
| 18 // |
| 19 // Note that this WatcherManager is not always correct. See comments at |
| 20 // ArcDocumentsProviderRoot::AddWatcher(). |
| 21 class ArcDocumentsProviderWatcherManager : public storage::WatcherManager { |
| 22 public: |
| 23 explicit ArcDocumentsProviderWatcherManager( |
| 24 ArcDocumentsProviderRootMap* roots); |
| 25 ~ArcDocumentsProviderWatcherManager() override; |
| 26 |
| 27 // storage::WatcherManager overrides. |
| 28 void AddWatcher(const storage::FileSystemURL& url, |
| 29 bool recursive, |
| 30 const StatusCallback& callback, |
| 31 const NotificationCallback& notification_callback) override; |
| 32 void RemoveWatcher(const storage::FileSystemURL& url, |
| 33 bool recursive, |
| 34 const StatusCallback& callback) override; |
| 35 |
| 36 private: |
| 37 // Owned by ArcDocumentsProviderBackendDelegate. |
| 38 ArcDocumentsProviderRootMap* const roots_; |
| 39 |
| 40 base::WeakPtrFactory<ArcDocumentsProviderWatcherManager> weak_ptr_factory_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderWatcherManager); |
| 43 }; |
| 44 |
| 45 } // namespace arc |
| 46 |
| 47 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_WATCHER_MA
NAGER_H_ |
| OLD | NEW |