| 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 21 matching lines...) Expand all Loading... |
| 32 // InstanceHolder<mojom::FileSystemInstance>::Observer | 32 // InstanceHolder<mojom::FileSystemInstance>::Observer |
| 33 void OnInstanceReady() override; | 33 void OnInstanceReady() override; |
| 34 void OnInstanceClosed() override; | 34 void OnInstanceClosed() override; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 class DownloadsWatcher; | 37 class DownloadsWatcher; |
| 38 | 38 |
| 39 void StartWatchingDownloads(); | 39 void StartWatchingDownloads(); |
| 40 void StopWatchingDownloads(); | 40 void StopWatchingDownloads(); |
| 41 | 41 |
| 42 void OnDownloadsChanged(const std::vector<base::FilePath>& paths); | 42 void OnDownloadsChanged(mojo::Array<mojo::String> paths); |
| 43 | 43 |
| 44 std::unique_ptr<DownloadsWatcher> watcher_; | 44 std::unique_ptr<DownloadsWatcher> watcher_; |
| 45 | 45 |
| 46 // Note: This should remain the last member so it'll be destroyed and | 46 // Note: This should remain the last member so it'll be destroyed and |
| 47 // invalidate the weak pointers before any other members are destroyed. | 47 // invalidate the weak pointers before any other members are destroyed. |
| 48 base::WeakPtrFactory<ArcDownloadsWatcherService> weak_ptr_factory_; | 48 base::WeakPtrFactory<ArcDownloadsWatcherService> weak_ptr_factory_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(ArcDownloadsWatcherService); | 50 DISALLOW_COPY_AND_ASSIGN(ArcDownloadsWatcherService); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace arc | 53 } // namespace arc |
| 54 | 54 |
| 55 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ |
| OLD | NEW |