| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // InstanceHolder<mojom::FileSystemInstance>::Observer | 34 // InstanceHolder<mojom::FileSystemInstance>::Observer |
| 35 void OnInstanceReady() override; | 35 void OnInstanceReady() override; |
| 36 void OnInstanceClosed() override; | 36 void OnInstanceClosed() override; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 class DownloadsWatcher; | 39 class DownloadsWatcher; |
| 40 | 40 |
| 41 void StartWatchingDownloads(); | 41 void StartWatchingDownloads(); |
| 42 void StopWatchingDownloads(); | 42 void StopWatchingDownloads(); |
| 43 | 43 |
| 44 void OnDownloadsChanged(mojo::Array<mojo::String> paths); | 44 void OnDownloadsChanged(const std::vector<base::FilePath>& paths); |
| 45 | 45 |
| 46 std::unique_ptr<DownloadsWatcher> watcher_; | 46 std::unique_ptr<DownloadsWatcher> watcher_; |
| 47 | 47 |
| 48 // Note: This should remain the last member so it'll be destroyed and | 48 // Note: This should remain the last member so it'll be destroyed and |
| 49 // invalidate the weak pointers before any other members are destroyed. | 49 // invalidate the weak pointers before any other members are destroyed. |
| 50 base::WeakPtrFactory<ArcDownloadsWatcherService> weak_ptr_factory_; | 50 base::WeakPtrFactory<ArcDownloadsWatcherService> weak_ptr_factory_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(ArcDownloadsWatcherService); | 52 DISALLOW_COPY_AND_ASSIGN(ArcDownloadsWatcherService); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace arc | 55 } // namespace arc |
| 56 | 56 |
| 57 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ |
| OLD | NEW |