Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Fix ui_arc_unittests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc b/chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc
index e921a4c3b28ba529aadfd3d85e24d9c5acb208e3..ceda7176f05015165d4d11885f9ecefad313b57f 100644
--- a/chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc
+++ b/chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/arc/arc_downloads_watcher_service.h"
+#include <map>
#include <memory>
#include <utility>
@@ -175,22 +176,23 @@ ArcDownloadsWatcherService::ArcDownloadsWatcherService(
ArcBridgeService* bridge_service)
: ArcService(bridge_service), weak_ptr_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- arc_bridge_service()->AddObserver(this);
+ arc_bridge_service()->file_system()->AddObserver(this);
}
ArcDownloadsWatcherService::~ArcDownloadsWatcherService() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- arc_bridge_service()->RemoveObserver(this);
+ arc_bridge_service()->file_system()->RemoveObserver(this);
StopWatchingDownloads();
DCHECK(!watcher_.get());
}
-void ArcDownloadsWatcherService::OnFileSystemInstanceReady() {
+void ArcDownloadsWatcherService::OnInstanceReady(mojom::FileSystemInstance*,
+ uint32_t version) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
StartWatchingDownloads();
}
-void ArcDownloadsWatcherService::OnFileSystemInstanceClosed() {
+void ArcDownloadsWatcherService::OnInstanceClosed(mojom::FileSystemInstance*) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
StopWatchingDownloads();
}
@@ -219,7 +221,7 @@ void ArcDownloadsWatcherService::OnDownloadsChanged(
const std::vector<base::FilePath>& paths) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
- auto instance = arc_bridge_service()->file_system_instance();
+ auto instance = arc_bridge_service()->file_system()->instance();
if (!instance) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698